Zsh is a shell with many advanced command-line and scripting features.

learn more… | top users | synonyms (1)

2
votes
2answers
78 views

open tab in gnome-terminal

I ran gnome-terminal --working-directory=$DIR but it opens in a new window, not tab. Things I've tried: --tab -T --add-tab Running RHEL5 with zsh
2
votes
2answers
382 views

remove a host from the completion list for ssh in zsh

I once had some hosts named 'myhost', 'myhost1', etc. And now all those except 'myhost3' become invalid. I removed those from /etc/hosts and ~/.ssh/known_hosts, but zsh still completes them for me. Is ...
15
votes
1answer
602 views

How to fix tab completion so it doesn't hide entries?

I'm using oh-my-zsh on Mac OS X with homebrew'ed zsh 4.3.12. I stumbled recently on a weird problem. In scripts/not-used I have several .R files: breakdowns.R eventloop.R ...
3
votes
1answer
189 views

zsh and COLUMNS

I cannot understand the behavior of the $COLUMNS variable under zsh. Here's an example of the sort of behavior I'm referring to. The script $HOME/cols.sh is the following: echo "COLUMNS=$COLUMNS" ...
2
votes
1answer
187 views

ESC-q doesn't work in tmux with zsh

The title says it all. I use Escq a lot (stashing the current line while I execute another command), and it works fine with Gnome Terminal 3.6.0 + zsh. However, if I start tmux, then it stops working: ...
1
vote
1answer
36 views

zsh colored prompt

this is my PROMPT PROMPT='%{$fg[green]%}%n%{$reset_color%}@%{$fg[white]%}%m%{$reset_color%}:%{$fg[yellow]%}%~%{$reset_color%} $(git_super_status) %{$fg[white]%}\$%{$reset_color%}' Yes, the new line ...
1
vote
1answer
17 views

Cygwin: CD to Windows paths easily

In Windows paths are (unreasonably) long, so it is common to drag and drop from some links to the terminal or copy and paste paths from file managers. It is possible to put in the shell init file a ...
1
vote
1answer
133 views

Installing oh-my-zsh without git

How can I install oh-my-zsh from master on the machine behind firewall and without git and internet access?
0
votes
1answer
216 views

Path variable not being set properly in zsh

For some reason, my $PATH variable is not being set properly which means I can't run a lot of commands I would like to. Here are the relevant lines from my .zshrc file: if [[ -f ~/.profile]]; then ...
26
votes
0answers
663 views

Completing avfs fake directories in zsh

How can I tweak zsh's completion system to complete “fake” files in some circumstances? More precisely, the AVFS filesystem exposes archives as directories by creating a “fake directory” next to ...
4
votes
0answers
191 views

How to write a shell script to run multiple command in different screen sessions?

My goal is to write a zsh script in order to create multiple screen sessions and run separate commands on each of them. I would also like to check at the beginning of my script if there are any ...
4
votes
0answers
93 views

How to combine zsh autocomplete for wrapper function arguments and existing command

I work mostly in gvim and many terminals. Originally, I preferred to open all my files in a single vim instance. To that end I used an alias to open files from my terminals in the current 'vim ...
4
votes
0answers
610 views

Gnome-terminal and Zsh: keep current directory on new tab/window

I'm running gnome 3.10.1 on Arch with Zsh. I'm facing that problem that when I create a new tab or window from a terminal window, it resets the current dir to my home dir. I've already tried this: ...
3
votes
0answers
411 views

git completion with zsh: filenames with spaces aren't being escaped properly

Git completion: I'm having difficulty with git's filename autocompletions on my system. I'm using zsh (5.0.5) with git (1.9.3) on OS X (10.9.3). Both zsh and git have been installed via homebrew. ...
3
votes
0answers
79 views

Call vared and complete files from a different directory

I have the following zsh function which lets me edit symbolic links using the vared ZLE builtin. function lned { emulate zsh setopt err_return extended_glob local_options local_traps local -a ...
3
votes
0answers
114 views

Git completions for aliases only available after running `git reflog`

I have a few aliases that I want to autocomplete for git, e.g., the following alias gco="git checkout" When I was attempting to add completions for this alias, I looked around in my path and saw ...
2
votes
0answers
78 views

How can you get the current terminal line (the one that is still editable by the user)?

I need a way to use the current line which the users typed into as variable for a shell function. my current code, which can be called by ctrl+r zle -N search bindkey "^R" search search () { read ...
2
votes
0answers
82 views

Corrupt files after extracting with Cygwin's GNU tar

I have a bunch of tarball backups which I just restored onto my new Windows 8.1 + Cygwin system using GNU tar: zsh$ for file in **/*.tgz; do tar xvzf $file; done To my surprise a lot of these ...
2
votes
0answers
52 views

ZSH and completion of files with newline characters

I am experimenting with ZSH on nasty file names, especially file names with the newline character in it. Here is how I create them: $ touch "filename<hit return here> 1" $ touch ...
2
votes
0answers
114 views

zsh: Echoing every statement?

I have an odd problem with zsh when I switch between shells in a particular way: Option 1 (works well): I start a zsh shell. I switch to tcsh with /bin/tcsh, and I switch back to zsh with /bin/zsh ...
2
votes
0answers
145 views

Is there a postexec/predisplay hook for ZSH?

I know zsh has a preexec hook that fires before the command is executed, but is there one that fires after the command has been initiated but before the output is displayed to the screen? I ask ...
2
votes
0answers
712 views

Problems changing PS1 to use special character

I'm trying to get my zsh to look something like this: https://bbs.archlinux.org/viewtopic.php?pid=1068202#p1068202. Whenever I print the └───╼ part of the PS1 to my terminal (or in the .zshrc for ...
2
votes
0answers
289 views

Physical Terminal (DEC VT220) issues with ZSH

I recently purchased a VT220 and all the hardware necessary to hook it to my macbook pro. After several hours of fiddling I got it working with a shell - my only problem is my shell of choice, ZSH, ...
1
vote
0answers
11 views

autojump : favor folders that share the most parents with current directory

Say I have following folders hierarchies : /home/kray/virtualenv/dev1/myproj/bin /home/kray/virtualenv/dev2/myproj/bin And i type in a console: $ pwd ...
1
vote
0answers
69 views

Bash script for opening screens and compiling the same file

I have written a bash script to initiate separate screen sessions and run a command in each of them that compiles the same C++ source file in ROOT (an object-oriented data analysis framework ...
1
vote
0answers
25 views

Manual tab completions in zsh

I would like nm[TAB] to expand to node_modules in zsh. Is this possible? How can it be done? Ideally, it wouldn't be triggered if there is another completion available, such as an already existing nm ...
1
vote
0answers
110 views

Zsh: quickly bookmark commands

I just had an idea, I'm sure it must exist though I could not find anything on the web. This topic gets close to my idea but not enough: How to quickly store and access often used commands? I'd like ...
1
vote
0answers
153 views

Navigating through the directory stack in zsh from the command line

In zsh, is there a way to navigate through the history of directories that I have visited (those listed in dirs) when I am typing a command in the command line? For example, say that I start typing ...
1
vote
0answers
30 views

Make zkbd ignore $DISPLAY

Is it possible to make zkbd ignore $DISPLAY variable? I have set up when I log in to different X sessions and it is annoying if suddenly I need to reenter/copy configuration (and I have no idea why ...
0
votes
0answers
25 views

How to show gemset in ZSH-prompt if rvmrc is used?

There are several ZSH themes that presents the gemset in the prompt by calling "rvm-prompt". For example, the "gallois" theme: example My question is if it is possible to only show this if the ...
0
votes
0answers
50 views

Powerline bash prompt not colorized in tmux

The bash/zsh commandline prompt is not displaying colors in tmux, even though I managed to get the powerline itself working (with colors). The prompt works fine in pure bash/zsh. I am getting the ...
0
votes
0answers
31 views

Zsh script cannot find screens

I have created a zsh script launching many screens in detached mode with particular names and running particular processes in them in order to automate some data analysis in high energy physics. ...
0
votes
0answers
29 views

Zsh - Modify File Completion w/ Quotes

I've been using Zsh recently, and when I complete a file name within quotes, the completion adds a space after the completed file name. Interestingly, this does not occur when I complete directory ...
0
votes
0answers
149 views

zsh/Prezto: difficulties with right prompt alignment

This may be stupidly simple, but... I am trying to make my own prompt for Prezto. I have been using numerous prompts for reference (I can post a list if necessary). My RPROMPT and cursor are refusing ...
0
votes
0answers
61 views

zsh completion doesn't correct ? (question mark) in paths

So, I've been pretty happy with my zsh completion and correction configuration for a while now, with this being a major exception. Configured as I have it, the shell routinely catches and corrects ...
0
votes
0answers
61 views

Zsh completion duplicates folder names

I'm seeing a strange problem when completing folders with zsh 5.0.2 (and oh-my-zsh). When I go to tab complete folder names for a relative path, the folder names often duplicate and lose colour ...
0
votes
0answers
76 views

Specifying numeric ranges in zsh history

According to the docs I can tell the zsh history to print lines in a range. The docs say "history [first [last]]" I've tried "history a b" but that gives a too many arguments error. I've also tried ...
0
votes
0answers
265 views

python error using an executable with Z shell

I'm getting this error from the Unix Z shell (I'm on Mac): python: posix_spawn: /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python: No such file or ...