You are here: Home » Z » Zs » Zsh

Zsh

Posts tagged with Zsh

Cycle through matches in ZSH history-incremental-pattern-search-backward
I recently switched the history search to use history-incremental-pattern-search-backward since it allows for patterns in the search. Here is how it is setup in my .zshrc bindkey -M vicmd '/' history-incremental-pattern-search-backward ...

Zsh not hitting ~/.profile
I've just installed zsh on my Ubuntu system. It seems zsh isn't executing ~/.profile on init. To my best understanding, this should be an automatic behavior. What am I missing? ...

Bash/ZSH: Undoing 'disown'
Is there a way to 'reattach' a process to the shells job table after it it has been 'disowned'? Edit: $SEARCHENGINE totally fails me. Doesn't look too good. ...

How is zsh pronounced?
How is zsh pronounced? Is it 'Zee - Shell', 'Zed - Shell' or is it said pronounced like it's written 'zsh'? ...

REPORTTIME for Bash
Zsh has an ingenious feature that automatically prints timing statistics for commands taking longer than $REPORTTIME to execute. Think of it as automatically executing a pipeline through time as needed. Fro...

Loop: Start program and kill after time out
Hi, for debugging reasons I want to spot one of those bugs showing up just occasionally. Therefore I want to code a while loop in the shell starting the program (if it will segfault => that's what I want) kill the program after a certain time...

Binding Fn-Delete in zsh on Mac OS X
In zsh, whenever I press Fn+Delete (which is forward delete) a tilde (~) gets inserted. This indicates zsh doesn't have the key bound. How do I bind it, and make it behave normally (delete in front of the cursor)? ...

What is the zsh equivalent of bash's !$ (Bang Dollar)?
In bash I can do ls foo/ [...] echo !$ foo/ What is the zsh equivalent? ...

Zsh Package Suggestion
Hello, I've just migrated to Zsh from Bash, but I have a bit of a problem in it. In bash on an Ubuntu system, when I type the name of a command which does not exist, Bash searches the apt database for a matching command name and prints out the package names that provide that command. It's a reall...

can zsh do 2 stage completion?
Let's say I have the following files in the directory: abc123ABC abc123QWE abc456 Now suppose I type a and hit TAB. In bash the completion as it usually works would just complete abc and stop with me ha...

ZSH only displaying last 16 or so commands with history. HISTSIZE & SAVEHIST are 500
In ZSH when I type history I'm only displayed the last 16 or so commands. I would like history to display all the existing commands in the history file. When I look in my .zsh_history (my history file) I see all the 500 previous commands that should be th...

How do I fix my zsh prompt now that I’ve upgraded to snow leopard?
I recently upgraded my system to snow leopard and now my prompt doesn't work properly. I have this line in my .zshrc file: PROMPT='%{$fg_no_bold[cyan]%}%n@%{$fg_no_bold[red]%}%m%{$fg_no_bold[green]%}$(git_branch)%{$reset_color%}: ' (where "git...

Cygwin/Git Bizarre Terminal Issue
Alright, this is weird. First off, this is mintty running on up-to-date cygwin, with git pulled from cygwin's setup.exe. I am running zsh. $ git clone https://<user>@<domain>/<repository>/ ~/src/project/dev Initialized empty Git repository in /cygdr...

Parallel shell loops
Hi, I want to process many files and since I've here a bunch of cores I want to do it in parallel: for i in *.myfiles; do do_something $i `derived_params $i` other_params; done I know of a Makefile ...

How do I customize zsh's vim mode?
Ok, so I finally made the great change. In my .zshenv, I changed my EDITOR: export EDITOR=vim There are a couple of questions I have that are so minor that I didn't want to start separate questions for them. Here they are: &...

How can I make zsh completion behave like Bash completion?
I switched to zsh, but I dislike the completion. If I have 20 files, each with a shared prefix, on pressing tab, zsh will fully complete the first file, then continue going through the list with each press of tab. If I want one near the end, I would have to press tab many times. I...

User directory in PATH in zsh: ~ Does Not Work
I'm doing this in my .zshrc PATH="~/scripts:$PATH" and if I do echo $PATH it appears as the first thing in the path. Yet this directory isn't included in the executable path (nor for tab-completion). What am I doing wro...

Get Function Into PS1 (Zsh)?
This works in Bash (parse_git_branch is a defined function) export PS1="\$(parse_git_branch)" but I cannot figure out the equivalent in zsh. Note: If I do PROMPT="$(parse_git_branch)" &...

Pipe to grep not working in zsh
I am doing something I always do in Bash: set | grep -i path and the output is Binary file (standard input) matches What's wrong? grep --help works, and set | more...

What's at Risk with Switching to ZSH?
Most advice for Mac is written assuming you use the Bash shell. If I switch to zsh, how incompatible do I become with current Bash scripts that I have on my system, and advice people on SU give me? Does the #!/bin/sh line at the beginning of my scripts help? &...