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

learn more… | top users | synonyms

2
votes
0answers
27 views

How to delete old $PATH echo in Mac

After i changed my Mac username(using the way supplied by Apple Documents), I found that when echo $PATH, there are some old paths in it. ...
1
vote
1answer
34 views

Screen window title using zsh

I would like to make vim screen tabs name more useful. I've turned on the screen plugin, and tried several approachs. One that I would enjoy most was to make the screen name fixed using another load ...
3
votes
1answer
18 views

reload all running zsh instances

I typically have on the order of a dozen zsh processes running. When I edit my config files, I'd like a clean way to get them all to re-initialize. Ideally, this would not mean completely killing them ...
0
votes
1answer
17 views

Bash: immediately disown job after it is started (Bash inbuilt equivalent of Z Shell's &!)

Is there a Bash equivalent of Z Shell's &! (or &|), i.e., immediately disown a job after it is started? I looked in Bash Reference Manual and searched in Google but can't seem to find anything ...
0
votes
1answer
6 views

Zsh backward-delete-word does not recognize “/” character

I want ctrl-W on Zsh to stop when it encounters the "/" character. I have the following in my .zshrc file, but it doesn't stop on "/". What is going on? default-backward-delete-word () { local ...
1
vote
1answer
14 views

Start zsh with a prompt specified on the command line

Is it possible to start an interactive zsh session with a specific prompt without modifying a configuration file? I tried things like that: zsh -c 'autoload -U prompt; prompt adam1; zsh -i' But ...
0
votes
2answers
37 views

How to draw a line between commands in zsh shell

Does anyone know how to draw lines in between the commands in zsh? Here is an example with MobaXterm:
0
votes
1answer
9 views

On MacOS setting zsh as shell using chsh does not change $SHELL

chsh -s /usr/local/bin/zsh The abover changes my default shell to ZSH, however even after starting a fresh session $SHELL is still set to /usr/local/bin/fish, my previous shell. So if I do exec ...
1
vote
0answers
17 views

focus to newly opened terminal

I am using gnome-shell 3.14 on archlinux 3.17.3-1. I have a keyboard shortcut (ctrl+alt+T) to open an xfce4-terminal. My issue is that when I triger this shortcut the focus is not set the the newly ...
3
votes
1answer
25 views

How can I get ZSH shared history to work?

I have setopt share_history and set opt inc_append_history set in my ~/.zshrc. This is almost working. In session 1, I execute a command, it's written to history. In session 2, the command is not ...
0
votes
1answer
37 views

“broken pipe” after every terminal command

I’m running Mac OS X 10.10 (Yosemite) with iTerm2 and Oh-My-Zsh. After every command I run—even if the command is successful—I receive the error “broken pipe.” How can I troubleshoot what is ...
0
votes
1answer
18 views

In zshell how do I make the command line prompt visible

My zshell command line prompt has become almost invisible, I don't know how or why, but now it's white on a very pale grey background. Can someone please give me a command, preferably a short one, ...
2
votes
1answer
49 views

Dynamic variable substitution in PATH

I want to run different versions of Java on the same machine (Linux Mint 17) with default to Java 7. So I put this into /etc/environment: JAVA_HOME="/tools/java/java7" JAVA7_HOME="/tools/java/java7" ...
1
vote
1answer
26 views

Indent execution results in zshell

I'd like to customize my zshell so that the prompt is butted up against the left border like normal. I'd also like to have all execution results indent by perhaps 2 spaces. Is there a way to indent ...
2
votes
2answers
29 views

Is there a man page for PROMPT in zsh?

I know how to look up commands with the man command. When looking at other people's .zshrc files, I see what I think are builtin variables (PROMPT, RPROMPT, etc.). Where might I learn more about ...
2
votes
2answers
31 views

How to shrink the prompt of a long path using environment variables in OS X (extend '~')

I've seen this working with the gemset environment, I would like to reproduce it now that I need to work on a very indented directory path. Basically I had a $GEM_HOME environment variable pointing ...
2
votes
1answer
26 views

How to show a caret-C in canceled command line in zsh, like bash does?

When I'm in the middle of entering a line to my shell of choice, and change my mind, I can quickly throw C-c and start afresh. Under bash it looks like this: user@machine:~$ rm everything^C ...
1
vote
1answer
18 views

ZSH custom widget not working as I think it should

I'm trying to define a function so that I can launch Midnight Commander by pressing Alt-, but the function just doesn't work. I found and modified a function on another site and modified it so: ...
0
votes
1answer
37 views

Cannot copy from Vim under Tmux into clipboard using "+p on Ubuntu

I'm using zsh, tmux, and Vim and for some reasons recently, I've noticed I cannot copy from Vim to X clipboard under tmux using "+y. Any idea how I can troubleshoot this issue? It used to work before. ...
1
vote
0answers
22 views

Zsh autocompleting cd with other people's home directories

Found this weird behavior with zsh autocompletion for cd. For some reason, if I write the prefix of a username after cd and press tab it will autocomplete to username/ and try to cd to that user's ...
1
vote
1answer
23 views

ZSH completion of long options gives short options

When trying to complete for example git difftool --cached, ZSH should complete directly, but instead if gives me a lot of short options to choose from, am I doing something wrong? My current config ...
1
vote
2answers
34 views

Alter output of every command

I'd like to know if there's any way of altering output of every command I execute in terminal. The purpose is to make the output formated for my markdown howto's. E.g. ls -la .*z #>-rw-r--r-- 1 ...
2
votes
1answer
100 views

Percent sign (%) in front of shell command

I just pasted a bunch of code into my shell, but forgot to remove the leading % before running the command. It appears to have done nothing. Why does this do nothing in my shell (zsh)? > % echo ...
0
votes
1answer
158 views

cannot run bundle using zshell, get git errors

I have oh-my-zshell installed and these are my plugins plugins=(git rails ruby coffee npm bundler) I can run npm fine, but whenever I run bundle install inside m project i get this error etching ...
0
votes
1answer
10 views

zsh git completion reports _git:4113: bad set of key/value pairs for associative array

I have installed zsh and git on SLES 11 SP2. When I try to trigger an auto complete for a git command I get the following error message: zsh git completion reports _git:4113: This is my .zshrc # ...
2
votes
1answer
58 views

How to use prezto with zsh on cyginw

I have setup perzto with zsh on cygwin. I am using the default sorin theme as my prompt. I see 3 rectangles as the end of my prompt instead of 3 ">>>". Is there a way to fix it? Can I use a different ...
1
vote
2answers
87 views

Start a new session from within tmux with ZSH_TMUX_AUTOSTART=true

I have enabled tmux plugin in oh-my-zsh with ZSH_TMUX_AUTOSTART=true and now every time I open terminal I am attached to a session. That part is really nice. The problem is – now I can't start a new ...
1
vote
0answers
20 views

Disable complete-ahead feature

When I press Tab to autocomplete with ZSH in Kubuntu 14.04, if the possible completions have common characters at the end of the word, those common characters show in the line that I am editing. For ...
2
votes
1answer
46 views

Typing 'git log --oneline' in oh-my-zsh pipes to 'less'

I just switched to Oh My Zsh and I'm using the Avit theme. When I type git log --oneline my output seems to be piped to less. It does this for whatever theme I use. When I used bash shell, it never ...
0
votes
0answers
31 views

vim leaving empty display on exit

I'm on OSX using zsh and vim clears my screen on exit, unlike less or man and other applications. When I exit vim, the next command prompt is on the very bottom of the screen, leaving empty lines ...
0
votes
0answers
16 views

Z Shell: how to remove mail notifications?

Every time I open zshel I get notification No mail for user How can I stop them?
0
votes
1answer
80 views

'subl' command stopped working in zsh

When I try to create a file from the command line I get the error zsh: command not found: “open This was working and stopped a few days ago :( In my .zshrc file the shortcut is: alias subl=“open -a ...
0
votes
0answers
12 views

How to run a zle widget from an alias

I am using the sudo plugin for oh-my-zsh, which usually is bound to (Esc) (Esc). However, I'd prefer an alias for sudo !!. The plugin actually defines a zle widget, but how can I call this widget ...
39
votes
4answers
7k views

Does the Shellshock bug affect ZSH?

Does the Shellshock Bash bug affect ZSH? Is upgrading Bash the only solution?
0
votes
1answer
40 views

How to install 'which' command on mac

I have removed "which" command from /bin directory. when i try to install it via Homebrew package manager, i get Error: No available formula for which
0
votes
0answers
49 views

Neither less or less -X clear screen on exit. (Trust me, I googled…)

Neither less or less -X clear screen on exit. At the same time, vim does.... Env iTerm2, protocol mosh, server Centos + tmux + zsh iTerm2: report term as xterm-256color tmux: set -g ...
0
votes
1answer
19 views

Light way to read big bz2 compressed files

bzcat *.log | sed # etc works but since the files are few gb big, it takes time to complete. Is there a way to do it in a faster way ? I tried echo *.log | xargs -P 4 bzcat | sed # etc but the ...
0
votes
0answers
29 views

Trap a program that has no command line output

I am using the CrashPlan backup tool to backup my home file server. I use an ssh tunnel to interact with the GUI on the remote machine (as detailed here). Currently, I have an alias in my zshrc that ...
0
votes
0answers
23 views

Why does iTerm2 print out 1 at start?

my problem is that iTerm print out the 1 value on my zsh when i open it i can't figure it out why. I've checked the advanced setting in my profile configuration but it seems that nothing is added ...
0
votes
0answers
17 views

ZSH not issuing tab completion on nfs shares?

I'm having some odd issues where when I attempt to use tab completion on nfs mounts, it does not offer any completions or suggestions. It simply does nothing. Any ideas as to what may be causing ...
2
votes
2answers
58 views

How to find files by type and show it's respective path

I'm trying to list all JPG files inside a directory tree to create a report of JPG files inside this tree without search inside every directory one by one. The command I'm using is this one: ls ...
2
votes
1answer
53 views

What does this zsh for syntax mean?

I working on source controlling my dotfiles and a lof of what I'm doing is based off of Zach Holman's dotfiles. I want to source all zsh files like he does in his files but before I just throw the ...
0
votes
1answer
54 views

How to determine if a screen is running jobs without attaching to it?

I wrote a zsh script that launches many screen sessions and runs a different command in each of them. When the script is executed there are 72 screens in total, so checking if a job is finished or not ...
0
votes
3answers
61 views

Shuffle file name arguments in zsh

Suppose the application can only open files via command line arguments, how would i go about randomizing a list of file names/paths to accomplish this? I thought this should be fairly easy but ...
1
vote
2answers
101 views

zsh process taking 95% of my CPU

When opening my activity monitor, I have a zsh process taking all my CPU. Is it normal? I have iTerm and oh-my-zsh installed but I don't expect it as a normal behaviour. Any idea?
0
votes
1answer
36 views

Default prolog for all ZSH scripts?

I have a file that contains several helper functions, meant to be used only in other ZSH scripts. I do not want them to be loaded with my profile. To make these functions available in my script, I ...
2
votes
1answer
34 views

for breaks script execution in ZSH

I feel dumb. I have a ZSH script with eg two file loops, eg: for f (*aaa*) {echo "$f"} for f (*bbb*) {echo "$f"} The script exits if the first find does not find matching files. I need the script ...
2
votes
1answer
118 views

Default shell for running scripts (w/o shebang) in macos?

I have ZSH as default shell in MacOS, everything is working fine. ZSH is installed as brew package, Ive set default shell in my account, new shell is listed in /etc/shells... everything is set, like ...
0
votes
1answer
86 views

Echo with ansii colors doubles my text (zsh,mac)

Im using iTerm2 on Mavericks. $TERM is set to xterm-256color. When I print this in command line: echo -e "\e[0;36m xxx \e[0m" the console beeps on error and the output is: xxx " xxx in correct ...
2
votes
3answers
61 views

Do not expand wildcard on tab completion

I'm wondering how I can configure zsh to not expand the wildcard in a filename. For example I have a directory of a couple hundred files named as following: a.foo-bar a.foo b.foo-bar b.foo c.foo-bar ...