Zsh is a shell designed for interactive use, although it is also a powerful scripting language.

learn more… | top users | synonyms

1
vote
1answer
457 views

zsh initial working directory

When I start a new zsh session it always seems to set its working directory to the last-known working directory of any other zsh session running on my system. Is there a way to configure zsh to just ...
0
votes
1answer
49 views

Time command not behaving correctly

I am having a weird problem with the time command. When I try and run $ time rspec spec It should return Finished in 15.78 seconds 75 examples real 0m22.334s user 0m17.952s sys 0m2.643s ...
3
votes
1answer
1k views

Why is a percent sign appearing before each prompt on zsh in Windows?

I'm getting zsh set up in Windows and I'm getting a reverse (black on white (black terminal background)) percent symbol in the first character position in the line just above every prompt. Usually ...
3
votes
1answer
126 views

Setting the $SHELL environment variable

For some reason, when I run chsh -s /bin/zsh, my $SHELL environment variable isn't getting set. When I run: echo $SHELL It outputs: /bin/bash
3
votes
2answers
150 views

Is it possible to highlight the non-breakable space in zsh / terminal?

I’m looking for possibility to somehow highlight the non-breakable space (\xA0) in the shell output to distinguish it from the normal space during debug sessions. E. g., I would like to see the output ...
2
votes
1answer
78 views

Weird behaviour of zsh iteration over content of a variable

I have a weird behaiour with ZSH when iterating over the content of a variable. A demo is better than a long talk in this case, so here is my problem: (yoann@freya) test_bash » ls file1 file2 file3 ...
1
vote
1answer
329 views

awesome does not recognize PATH change

I use zsh as my login shell, lightdm as login manager and awesome as window manager. I changed the PATH Variable in my ~/.zshrc and it works on the terminal, but awesome itself does not recognize the ...
0
votes
0answers
94 views

Source ~/.zshrc needed after OSX terminal restart

I have some zsh custom autocomplete set up in OSX for a custom command I have. These autocomplete functions are defined in ~/.zshrc. If I restart the OSX Terminal, I see that the autocomplete does not ...
3
votes
1answer
516 views

Does zsh support hash table as a built-in data type?

If supported, which version of zsh should I use to take advantage of this feature? How to declare and use it in code?
2
votes
3answers
1k views

After switching back to bash can't access root

I'm new to Linux and using Debian 7. I was using bash, but tried out zsh by using chsh. Initially probably entered a bad shell name but eventually switched to zsh successfully. Now I switched back to ...
1
vote
1answer
880 views

Terminal starting with “no such file or directory:” message on OS X

After installing/uninstalling homebrew and other command line software such as zsh, I had an issue with my command line prompt, which let me to remove several configuration files such as .bashrc, ...
3
votes
3answers
3k views

How to change Terminator title terminal title, ZSH on Debian?

I don't know if I should ask it here or on unix.stackexchange.com, I found this question here. My question is similar, I want to change the title of a terminal, I'm using a Debian based distro, ...
1
vote
0answers
152 views

Emacs + Zsh unexpected linebreaks

I'm new to Emacs, and I'm trying to switch my workflow to using my terminal through Emacs. I'm a Zsh user, and I love my terminal. I've been fiddling around with ansi term for a while now, and got my ...
1
vote
1answer
81 views

Zsh not recognizing file changes with search path

I'm using ZShell with Oh-My-Zsh on OS X 10.8. Updates within my search path aren't immediately recognized. My search path: [~]$ echo $PATH ...
1
vote
2answers
182 views

How to copy all the files from a folder but the symlink

I'd like to copy everything recursively from a folder but the files symlinked from an other directory, how can I achieve that?
1
vote
2answers
353 views

Set Tab Title to your current working directory instead of the current job name in zsh iterms

I'm running iTerms on my Mac OS X with zsh. With my workflow I have to switch between tab a lot and sometime I have to spend too much time just to find which tab is the one I'm looking for because all ...
2
votes
3answers
3k views

Change the sudo su shell

Whenever I run sudo su from my normal zsh (which uses the oh-my-zsh framework), I'm forced to use the old Bourne shell (sh) by default (obviously; this is standard behaviour on most *nix-like ...
0
votes
1answer
117 views

Controlling the width of a directory listing in terminals

I'm on OS X with iTerm2 and OhMyZsh. When I do an ls command, somehow it decides how much space it needs between the output columns. Is there a way to control that and tell it how many spaces to show ...
2
votes
1answer
130 views

Alias empty command in terminal

I would like to clear my terminal upon hitting submitting an empty command. In other words, I would like to call clear when I hit Enter on empty line. Is that possible? I understand that is not how ...
2
votes
2answers
391 views

Can't find the Cygdrive folder in Cygwin

I installed cygwin, zsh and oh-my-zsh following this project: https://github.com/haithembelhaj/oh-my-cygwin/blob/master/README.md And i can't find the cygdrive folder. Why? How can I mount my C:?
0
votes
0answers
54 views

Can I highlight the line at which a command was issued in zshell?

I am using zsh and oh-my-zsh and would like to easily find the start of a i.e. ack or find by changing the color of the line the command started. Is it possible to change the line color as soon as the ...
1
vote
2answers
81 views

zsh AUTO_NAME_DIRS doesn't work for certain variable names on OSX

I have a wierd problem with my zsh on my OSX 10.8 (with oh-my-zsh, which I think has AUTO_NAME_DIRS set for me). Normally if I set up an environment variable to some path by export ...
3
votes
1answer
1k views

How to get git flow completions for zsh working?

I have git and git-flow installed via Homebrew. I am on a Mac. I have zsh 5.0.2 (x86_64-apple-darwin12.4.0) git completions are working. git-flow completions are not. I cannot get git flow ...
0
votes
3answers
89 views

Temporarily transferring shell settings to remote ssh session?

I am curious, frequently I would like to transfer all of my shell settings (dotfiles) over to a remote session just during my session and then have them reversed when I logout. Even better would be ...
1
vote
1answer
241 views

Backspace behavior on terminal

I opened a zsh in a remote computer running Fedora 13 (yeah, it's old). When typing backspace everything works fine, but nothing happens when I type home (Ctrl+A does the job as expected). But when ...
1
vote
1answer
135 views

How can I call multiple commands as arguments to a function?

I want to write a "forever" function that I can run multiple commands until I manually kill it with Ctrl-C. Basically, from the zsh command line, I know I can do this, and this works fine: $ while {} ...
-2
votes
1answer
205 views

OSX zsh - Why do binaries only execute with the full path? [duplicate]

I'm just writing some small C scripts and testing them. Why dose ~ Desktop: gcc test.c -o test ; /Users/xx/Desktop/test ; work just fine while ~ Desktop: gcc test.c -o test ; test ; dose not ...
0
votes
0answers
79 views

How stop zsh backspacing over trailing underscore in autocomplete filename?

I have several files in my test directory that all start with 'test_'. I frequently use autocomplete to specify one of these files to edit or run. When I press tab to autocomplete, zsh correctly fills ...
0
votes
1answer
153 views

What command, if any, can be a good alternative to sublime text's find in folder?

Is there a way to find a string or phrase recursively in all files in a folder from the command line, such that the output would be similar to Sublime Text 2's find behavior? Like, with the path of ...
2
votes
1answer
310 views

How stop zsh from eating space before pipe symbol?

When I type a space followed by the pipe symbol '|' on the zsh command line, zsh eats the space, placing the pipe symbol directly up against the prior word. How do I stop it from doing that? I'm not ...
1
vote
3answers
147 views

How to create a series of commands in shell, which will stop execution on error

My usual git workflow for deploying is the following: [while on master branch] git pull git push git checkout production git pull git merge master git push Would it be possible to create a ...
0
votes
1answer
1k views

Many commands are not found by zsh

If I tab autocomplete, most of the time I get errors: If I do vim [TAB] to look for the files in the folder, it just jumps to the next command line. If I try to execute rvm use 2.0.0 --default I get ...
3
votes
3answers
53 views

Can I cycle through the history of shell commands that have only been used from current directory?

So when using arrow up/down to cycle through prior commands, is there any way I can limit those to the commands used from the current directory? This would make my life 10 times easier...
1
vote
1answer
166 views

zsh running a comand but not from the path

My zsh is doing something odd, it is running an executable that is not the first executable on my path. I have a wrapper script for ssh but the wrapper is not being invoked while the real ssh binary ...
3
votes
1answer
275 views

How to benchmark bashrc / zshrc and prompt rendering time?

As im currently experimenting with new stuff in my prompt i need a way to tell what the performance impact is. How can i monitor how long it takes to render my prompt and the time it takes to source ...
1
vote
1answer
1k views

How do I use sudo with alias in zsh?

Say I have these two in my .zshrc: alias sudo='nocorrect sudo' alias boot27='grub-reboot 4 && reboot' boot27 gives boot27: command not found. If I change the alias to 'nocorrect sudo ' ...
1
vote
2answers
270 views

How to merge ls commands colors with the output of find or du?

I have a simple alias to list the size of files&folders in cwd. ( including dotfiles in this case , ignoring zero sizes ) du -sh .[!.]* * | sort -hr | grep -v '^0' which can be achieved ...
3
votes
2answers
458 views

How to execute a function in bash or zsh on every letter being typed into prompt?

I know about preexec() hooks for zsh and the way this can be achieved in bash. ( link ) But can i get the current input while still typing? The idea behind this question is the following: in order ...
0
votes
1answer
286 views

Emacs, Zsh and Ansi-Term — weird chars

My issue is illustrated in the follow images: This is the visual representation I get in my iTerm of my Zsh shell, with the same font as used in Emacs: This my my Emacs output using ansi-term: ...
2
votes
3answers
385 views

How to make zsh completion like bash

I am using zsh. It is a nice shell, especially for the auto completion function. But, when I press tab, it always auto fill with the first completion option. For example, there are two files in my ...
2
votes
1answer
234 views

How do you change the background color of man pages?

Specifically, on OSX, in zsh. I'd like it when say... man man The background color is a darkish-yellow and the foreground is a charcoal gray/black. In this way I'm sure I'm looking at a man page ...
3
votes
2answers
444 views

Always run a command after another command

With zsh (and oh-my-zsh), is it possible to always run a command after a certain other command? I want to always run an ls after cding to a directory, rather than running cd example; ls every time. I ...
4
votes
2answers
3k views

zsh config - to export or not to export?

When setting variables in my ~/.zshrc I can either use export export PATH=/some/path or not PATH=/some/path How do these differ and which should I use?
1
vote
1answer
319 views

ZSH Quote escaping and expansion

I am trying to run tmux, passing several commands at once, and I'm unable to properly quote the string. The command succeeds when manually entered on the command line: ~% /usr/local/bin/tmux ...
1
vote
1answer
163 views

bind ctrl+insert in zsh?

What key combo do I use to bind ctrl+insert in my zshrc? I tried entering quoted-insert mode (ctrl+V) but pressing ctrl+insert does not output anything.
2
votes
1answer
322 views

How can I open an application using the command line and then close the terminal without closing the opened application?

If I open an application from the command line, say Firefox, the application runs as long as the terminal stays open. Closing the terminal's tab will close the application. Is there a way to open an ...
0
votes
1answer
151 views

Macports installed applications no longer showing up

I recently migrated my shell over to zsh from bash on my os x computer. I obtained zsh from macports, updated my default shell on os x, and restarted. When I tried to use port both shells said they ...
0
votes
1answer
72 views

ZSH, colourify & autocompletion

I have zsh with oh-my-zsh, I added an alias to color the make output using alias make="colourify make" but when I use it, make autocompletion does not work anymore. If I use unalias make, the make ...
3
votes
1answer
132 views

Add sound to keystrokes in iTerm2 / zsh

I've been searching for quite a while now, but haven't found anything. I want to spice my terminal up a bit more than just colorizing it – I also want to add specific sounds to keystrokes, newlines ...
3
votes
3answers
86 views

Only complete command names if no file name completions exist

Reasoning: I have autocd enabled, yet I never use it because it makes tab-completion a huge pain, as every single command name on my system will be completed along with the filename completions. ...