Tagged Questions

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

learn more… | top users | synonyms

1
vote
1answer
12 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
21 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
15 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, ...
1
vote
1answer
33 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
21 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
26 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
25 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
21 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
11 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
22 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
13 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
20 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
31 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
52 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
98 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
9 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
42 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
64 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
19 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
35 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
29 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
12 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
53 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
10 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
39 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
41 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
18 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
28 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
20 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
15 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
57 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
47 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
42 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
53 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 ...
0
votes
2answers
86 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
33 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
98 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
68 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
51 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 ...
2
votes
1answer
82 views

Using homebrew's OpenSSH on OS X with ZSH

I've installed the latest version of OpenSSH on OS X using homebrew. As per the instructions in the formula, I have edited the org.openbsd.ssh-agent.plist file to point to /usr/local/bin/ssh-agent, ...
1
vote
1answer
31 views

Hide all output from a background process

I have a bunch of commands in my zshrc which invoke another command in the background. The background command is an alias to a text-to-speech program (I use it to give me audio cues when processes ...
1
vote
1answer
35 views

ZSH Cull Old Aliases

When I call alias in a zsh shell, I get a list of aliases. Some of them are desired, some are not. I originally created a .alias file in my home directory, and added source $HOME/.alias to my .zshrc. ...
1
vote
1answer
29 views

Alternative to “fc -s” in zsh?

In bash, I had a handy alias: alias r="fc -s" Which just repeated last command. Same as !!. I am now used to it (muscle memory), but I can't seem to figure out how to recreate the alias. fc doesn't ...
2
votes
1answer
356 views

What is the difference between .zshrc and .zshrc-e

I've recently switched to using zsh instead of bash and I installed both zsh and oh-my-zsh. while messing with my configuration I noticed that there is a file named ".zshrc-e" in addition to the ...
1
vote
1answer
53 views

Adding file autocompletion in rake with zsh

I have oh-my-zsh installed with the rails plugin, when I use zsh completion with rake, it completes with the tasks list from rake -T. When I run a specific test, one of the parameters is the path to ...
0
votes
1answer
36 views

How to limit the number of lines for zsh 'cd -' completion?

Zsh's directory history is very useful. However, after wandering among many directories, it's annoying because too many lines are printed. How to limit the number of the lines to 10 or so, and print ...
1
vote
2answers
118 views

Terminal Command Colors [closed]

I like to have a really beatiful console style. I use zsh and I have changed my theme to "agnoster" See it under: oh-my-zsh My problem is that I do not have OS X and iTerm2 but I want to have these ...
0
votes
0answers
23 views

zsh hebrew alignment right to left

There is a way to configure zsh, to align right to left Hebrew file names? for example, if I use the command "ls" and there is Hebrew and English file names, the Hebrew file names will be displayed ...