Many of the useful features of bash, ksh, and tcsh were incorporated into zsh; many original features were added.
3
votes
1answer
42 views
How to 'source' a shell script using bash from zsh?
I am using zsh and like it very much, but work a lot with Android source which has compilation scripts that require bash to be evaluated correctly. These scripts need to be sourced prior to ...
0
votes
2answers
51 views
change default shell from zsh to bash
I'm trying to change my default shell in RHEL5 from zsh to bash.
I tried to the methods mentioned in this thead. By typing sudo /usr/bin/chsh -s /bin/bash, the system says sudo: /usr/bin/chsh: ...
1
vote
0answers
18 views
How can I stop zsh from autocorrecting on proper commands?
I'm having a very strange issue with an install of zsh on my local machine. It attempts to correct commands I've typed very aggressively.
Here are two examples.
If I type which ssh it will ask me if ...
1
vote
1answer
35 views
How to reclaim ^S in zsh?
I've found ^S mapped to be the fwd-search key for zsh (ohmyzsh) but I would like to use it in vim for various mappings as well - it seems like the zsh mapping is preventing me from using it now.
Any ...
0
votes
1answer
16 views
How can I make zshell skip confirming substitutions?
If I run the following commands in bash:
mkdir foo
cd !$
The second command will be interpreted as cd foo and executed.
In zshell (at least with my current configuration), it will make the ...
1
vote
4answers
53 views
Show PID of process just launched in ZSH
Can I show the PID of a process that I just launched, ideally at the end of the line of the command?
Example:
root in ~: mysqld .................. [PID 34567]
12121 mysql-logs start to come in...
...
0
votes
0answers
49 views
How can I put a newline in my zsh prompt without causing terminal redraw issues?
I'm trying to fix a minor (but annoying) issue with my zsh prompt. The problem I'm seeing is that when I'm using a terminal in a GUI OS environment (for example, Terminal.app or iTerm 2 on OS X ...
0
votes
0answers
13 views
XCode Command-T-style autocomplete for zsh
I've just started using the Command-T plugin for vim, and it rocks. In case you haven't heard of it, it allows you to type something like this:
Sb
to select Something.hs-boot from the list
...
1
vote
2answers
50 views
Zsh, directory tab-completion with prefix
I have a directory where I put all my projects in, let's say it's ~/projects as an example. I've made a command called s which takes one argument, and moves me into that directory. E.g.: s foo moves ...
1
vote
2answers
34 views
How to let shell return to the previous line after exiting a full-screen process like Vim
I connect to Z-Shell on a Red Hat Enterprise Linux 6.2 machine via Putty. After I exit a full-screen process, eg Vim and less, in Unix shell, the shell prompt starts at the last line of the screen. ...
1
vote
1answer
52 views
Record all commands
I am learning ruby and following tutorials in a book. I want to record all the commands i enter in shell( I am using zsh) . How can I do that? I should be able to stop and start recording.
0
votes
1answer
17 views
zsh completion for “git log”
When I type:
git log p<tab>
In Bash it expands it to git log production/master (if there's only one branch at existing production remote).
How can I have zsh behave like that?
EDIT:
This ...
0
votes
1answer
22 views
history-search-backward working differently in zsh than in bash
I have history-search-backward mapped as PageUp.
When I type:
git push <PageUp><PageUp><PageUp>
in Bash it begins to cycle through all history entries beginning with git push
in ...
1
vote
1answer
42 views
Custom Commands in ZSH
I'm fairly new to zsh, or bash for that matter.
I wish to set up custom commands, i.e. type desktop to bring me to my desktop. I have heard that if I edit my .bash_profile file with the following ...
2
votes
1answer
52 views
How to get ZSH previous command's history number in prompt?
I'm wanting to add the previous command's history number to my prompt, as well as the exit code.
At present,
%h[%?]
Gives me the current history number, as well as the last exit code. What I'd ...
4
votes
3answers
93 views
How can I do Ctrl-Z and bg in one keypress to make process continue in background?
So I realized I follow this pattern of suspending the task and then letting it to continue too often with the Ctrl-Z bg sequence, I was wondering is there any way to compress that to single keypress? ...
3
votes
2answers
59 views
Per-directory bash/zsh history log files
I find I do a lot of work on a project in a set directory. Sometimes - a few months down the track, I need to redo something on that project but I can't remember what the hell I did. I use mercurial ...
0
votes
1answer
13 views
How do I invert the exit code of a program or pipe within ZSH?
I want to invert the exit code of a piped command sequence: foo | bar within the ZSH. So 0 maps to 1 and 1-128 maps to 0.
0
votes
1answer
81 views
How to prevent scripts from changing the terminal's window title?
I'm using GNOME Terminal and zsh on Ubuntu with Awesome WM.
I need to launch a terminal window with a certain title set like "s1" and no script inside that terminal should change the title of the tab ...
0
votes
2answers
36 views
Open a new tab in the same dir as the previous
Im using zsh and it seems that a new tab should open in the same dir as the previous. However, that is not happening.
Do I have to add anything to the .zshrc?
1
vote
0answers
41 views
Messy output in zsh working in emacs M-x shell
I have changed my shell to oh-my-zsh, which is working great in iTerm.
However when I open up my Emacs, M-x shell, I see it also changes to zsh, but the output from executing commands is messy:
➜ ...
0
votes
0answers
48 views
How do i make Zsh cd completion list all files?
I want Zsh to display all files when using tab completion after cd.
Right now tab completion after cd only display directories. I want to see all the files.
Basically i want it to work the exact ...
1
vote
2answers
71 views
I run zsh from bash after connecting SSH – how can I exit both with only one command?
I run zsh on my server and I want to alias the exit command, because whenever I try to terminate my SSH session I must exit from zsh and exit from bash.
I tried alias exit='exit;exit' to no avail.
...
1
vote
0answers
66 views
Alter bash tab completion to make it more like zsh
I'm on a Mac and the cp and mv commands are killing me due to them copying the contents of a directory if a trailing slash is present. It has bitten me more than once when I use tab completion to ...
2
votes
1answer
54 views
zsh completion will not work in emacs shell
I'm learning about the more powerful tab-completion and expansion capabilities of zsh, and they don't seem to work when I run zsh under emacs with M-x shell:
cat $PATH<TAB> expands the tab ...
1
vote
0answers
21 views
zsh: Autocomplete ambigously only on second tab press
Currently, when I hit TAB, and there's more than one option to autocomplete, zsh will show all of them. If I hit TAB a second time, it will pick the first.
I'd like to change this to:
First TAB: ...
2
votes
1answer
41 views
man: command not found in zsh (Mac OS 10.58)
I changed to zsh from the default (by changing the "Shells open with" preference in Terminal to "command (complete path)" set to /bin/zsh
While most things seem to work, I tried to see the man page ...
2
votes
1answer
80 views
zsh right-justify in ps1
I'd like a multi-line zsh prompt with a right alined part, that will look something like this:
2.nate@host:/current/dir 16:00
->
I know about ...
1
vote
1answer
40 views
How do I use zsh's zle_highlight to highlight only “|”?
I am currently using zle_highlight in zsh to highlight the entire command line. However, I also hope I could highlight "|" using a different more discerning style.
After googling for a while, I ...
0
votes
1answer
21 views
zsh handlers like command_not_found_handler()
I'd like to format the zsh output.
eg for unfound functions I now have:
function command_not_found_handler(){echo $fg[red]"\033[4m???\033[0m"$fg[red]" Command \"$1\" not found."}
which returns red ...
1
vote
2answers
37 views
Is there a way to tell the shell (zsh preferably) about a command?
I defined an alias:
alias school="cd ~/School/3BaFys/"
to quickly go to the folder 3BaFys which contains all of the directories I need this year.
Is there a way to tell zsh that when I do:
...
2
votes
1answer
47 views
How to prevent a command in the zshell from being saved into history?
In Bash I know putting a space before a command prevents it from being kept in the history, what is the equivalent for the zshell?
1
vote
1answer
121 views
How to switch comfortably to vi command mode on the zsh command line?
In vi, I have mapped 'jj' to escape to be able to switch to command mode without using the annoying escape key. Now I want to have the same for command line editing for which I use vi-mode. I already ...
2
votes
1answer
52 views
Zsh's yank-pop is not working
In bash, you can kill words (Alt-Backspace) or lines (Ctrl-k), and yank them back later with C-y, and cycling the kill-ring with Alt-y.
Now when I'm using zsh, it is weird that Alt-y is not working ...
0
votes
0answers
25 views
How to bind command key in zsh?
It is possible to bind Command Key from mac os x in zsh? I can't find any information about that.
3
votes
0answers
62 views
Is it possible to use different zsh menu selection behaviour for different commands?
I'm using the menu select behaviour in zsh, which invokes a menu below the cursor where you can see the various possibilities. The .zshrc option i have set for this is:
zstyle ':completion:*' menu ...
1
vote
1answer
53 views
Copy files from m3u to destination
I have a playlist, m3u extended, formated like:
#EXTM3U
#EXTINF:213,2 Tåst - (foo bar)
/home/www/Music/Test/test 123 - test.mp3
My problem is, that it seems the line-break is encoded as '\n\r' ...
1
vote
1answer
46 views
Disable users from completing after a ~ in zsh
I like to use zsh's named directories feature to move about my file system quickly (e.g. so I can use ~src to switch to my source code directory).
I also like zsh's auto-completion features.
...
0
votes
2answers
111 views
Git: Good Practice for git remote update
I am working with other people on a project and would like to be notified in a timely manner if there is something to pull from GitHub (perhaps also other participants directly).
I was thinking about ...
1
vote
0answers
57 views
When I open zsh, some weird characters display as my prompt (oh-my-zsh on OSX)
I installed oh-my-zsh and now every time I open the terminal some characters display instead of the prompt. However, when I start typing something, the prompt shows correctly:
Last login: Wed Oct 5 ...
8
votes
1answer
208 views
How can I selectively disable zsh's version control integration when my CWD is on a remote filesystem?
I'm running zsh on OSX and on occasion I have to work on a mounted sshfs volume. However, git is REALLY slow over sshfs mounts. My prompt makes use of the vc mode stuff that zsh provides built in, but ...
1
vote
1answer
42 views
how to start an interactive shell with special setup
I want to start an interactive zsh (on cygwin) with project specific set-up:
source /etc/profile
source ~/.profile
source $PROJECT_HOME/Setup.zsh
become interactive
I got as far a step 3 but then ...
2
votes
1answer
79 views
bash wildcard completion
Is it possible to make bash expand wildcards on tab completion in the same style as zsh?
So imagine the following:
mkdir new
touch new/1.txt new/2.txt new/3.log
Now,
ls new/*.txt<TAB>
...
0
votes
0answers
99 views
Get “zsh-git-prompt” plugin working in my ubuntu zsh terminal
I am running Ubuntu 11.04 with zsh (ohmyzsh) and cant get this plugin working.
https://github.com/olivierverdier/zsh-git-prompt
I did all the steps but
unfortunately I receive this error msg when I ...
5
votes
2answers
104 views
Can I use Vim editing mode on the command line without losing recursive history search?
I'm uzing zsh and, because I'm an avid Vim user, I just switched to using Vim-style editing on the command line. (That means if I type ls foo/bar and decide I want to cd instead, I can hit Esc ^ to ...
0
votes
1answer
103 views
How to set dynamic ssh output to zsh variable?
I would like to set a variable to the output of a ssh command in zsh. The ssh command itself connects to a first server, then ssh again from this server to a second server where I want to execute my ...
0
votes
3answers
40 views
Issue with ./configure not being found
I recently upgraded to OSX Lion, and I have been clearing a lot of thing out in my dev environment that is not being used anymore.
My ./configure has seem to have disappeared, and I have made sure ...
1
vote
1answer
125 views
Where is my zsh getting its git completion settings?
My zsh does git completion, but I did not configure this myself. How can I figure out where these settings are coming from?
0
votes
0answers
99 views
zsh not load zshrc?
Whenever I run zsh in OS X it doesn't load my color preferences, I have to manually source my ~/.zshrc to get it to work.
I use oh my zsh, if it matters.
EDIT:
I added a alias
alias ls='ls ...
4
votes
2answers
180 views
Access Finder's “Open With” menu from the commandline (for tab completion)
On Mac OS X, I know one can open a file from the commandline with its default application with open, and with other applications with open -a <application name>. Thus,
open movie.avi
open -a ...