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

learn more… | top users | synonyms

1
vote
1answer
153 views

How do you search subnodes in Pinfo?

I installed Zsh`s info manuals. I run pinfo zsh I would like find the manual for typeset. I type in pinfo /typeset It only searches the current screen. How can you search all other nodes ...
3
votes
1answer
1k views

How should I automatically change my .zshrc for different OS'?

I am currently storing most of my dotfiles in a git repository to make keeping them in sync across all my computers easier. I've just recently acquired a Macbook so now have to have all my dotfiles ...
3
votes
2answers
3k views

make a certain software version the default in ubuntu

I currently have 2 version of php installed on ubuntu 12.04. one for php 5.3 installed using apt-get while the other one is installed with xampp with php 5.5 When i execute these commands: > ...
5
votes
2answers
671 views

Emacs key for Home & End

I'm running Emacs in urxvt with zsh as shell: ~ % echo $TERM && echo $SHELL rxvt-256color /bin/zsh ~ % My current problem is that I can't get Home key & End key working properly in ...
0
votes
0answers
20 views

Stop zsh incorporating /etc/hosts in autocomplete

I added loads of entries to my /etc/hosts file to aid in adblocking and tracking on the internet (a list I got from github https://github.com/StevenBlack/hosts). However, zsh now incorporates all the ...
11
votes
3answers
2k views

Removing the useless space at the end of the right prompt of zsh ($RPROMPT)

In zsh, there is always a space character at the right of my right prompt. I tried with a very simple .zshrc such as: PROMPT="#" RPROMPT="*" There is a always a space after the * on the right of ...
1
vote
0answers
27 views

Menu with ZSH (not completion)

I'm producing a whole lot of ZSH functions, and would like to provide an interactive menu to allow me to navigate to the various functions, gather required data and then invoke the functions. I've ...
0
votes
1answer
14 views

Append string to array elements and join them in one expression

Let's assume I have an array > words=(foo bar baz) Now I can join the elements > echo ${(j., .)words} foo, bar, baz And I can append a string to the elements: > echo ${^words}yeah ...
-1
votes
0answers
7 views

Which ZShell option are available for ${(%)}

In another post I learned about ${(%):-%N} and ${(%):-%x}. Now I wonder if there is a list of option. Of course not knowing what the feature is called there no chance to google it.
0
votes
1answer
24 views

Find the location of an alias definition

I can find the location of a function definition, but this doesn't work for aliases: $ type -a subl subl is an alias for /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl subl is /...
1
vote
1answer
22 views

Creating aliases beginning with + or -

Most of the times, I find that I'm doing: % chmod +x <file> #or +r or +w So, I thought about creating an alias such that: % alias +x='chmod +x' # or % alias \+x='chmod +x' # or % alias '+x'='...
0
votes
0answers
9 views

ZSH character indicator invisible when using arrow keys

I recently switched to zsh and after some tweaking am quite happy with it, but I have one problem: When I'm using the arrow keys to go back/forward a few characters the indicator that shows you on ...
0
votes
0answers
31 views

Strange prompt color issue with Solarized and OSX 10.11 Terminal.app

I am trying out some Terminal.app customization and have switched from the stock bash to zsh with oh-my-zsh. I have installed patched Powerline fonts and the a port of Solarized theme for the 256-...
0
votes
0answers
14 views

Why does setting CYGWIN=winsymlinks:nativestrict break zsh's (oh-my-zsh) history?

I have this in my .zshrc CYGWIN=winsymlinks:nativestrict When I source .zshrc or start the terminal. I get this error: zsh: locking failed for /home/r892107/.zsh_history: no such file or directory:...
5
votes
3answers
2k views

How can I get zsh to display international characters properly?

I just started using zsh, and love it. However, I've stumbled upon an annoyance when it comes to international characters: ➜ ~ touch åäö.txt ➜ ~ ls ...
3
votes
3answers
390 views

In ZSH line editor, how to insert a new line?

Say I am editing a single line, with my cursor at the indicated position: $ abc ꕯ def ghi I would now like to split into two lines and continue editing (like hitting ENTER would do in a text editor)...
0
votes
1answer
22 views

zsh cd tab completion matching

I'm trying out zsh and there's a tab-completion behavior that I'm finding annoying: It seems that if I type cd str and hit TAB, it will auto complete with *str*. For example, cd pl TAB results in an ...
1
vote
1answer
26 views

how do I correctly negate multiple zsh globbing expressions?

I have a directory with files. The files all have extensions. The extensions falls in 3 types: txt, foo and bar. I want to print all files that do not end in foo neither bar. I already know how to ...
0
votes
1answer
44 views

how can i make zsh tab completion fix capitalization errors? for directorys and files

I switched to zsh completely on a previous arch install and i LOVED it mainly because arch is one of the distros that capitalizes your Documents, Downloads, Music and such directories in your ~ ...
1
vote
1answer
140 views

Redirect colored output to file

I want to store a colored terminal output to a file (maybe a .rtf or whatever). In OSX I am able to manually copy it and paste it in a .rft file using Textedit, however I wanted to store it ...
0
votes
0answers
24 views

Terminal doesn't open after installing oh-my-zsh

I installed zsh and switched shells, and then after curling oh-my-zsh, LXTerminal and Termite do not open. I deleted oh-my-zsh and my zshrc and they still do not open. Any ideas? I was thinking of ...
1
vote
0answers
60 views

Speedup zsh startup time

I'm on MacOS 10.11. When I open a new tab on Iterm2, it takes almost 2 second to have the prompt. So I guess I have something in .zshrc / .bash_profile / .bashrc that takes times to load. Here are ...
1
vote
1answer
13 views

zsh autocompletion for a fresh executable in PATH

After copying a new executable to PATH, bash autocompletion for that command kicks in no problem, but zsh needs to be restarted. How do I nudge zsh autocompletion to pick it up without restarting the ...
4
votes
1answer
1k views

How to use regex quantifiers to rename multiple files with zmv?

I have the following files in a single directory: 1-1 - different text for each file here.txt 1-2 - different text for each file here.txt . . 1-9 - different text for each file here.txt 1-10 - ...
0
votes
1answer
25 views

Run command on tab completion in zsh

I'm trying to set up a zsh function that will take me back to the top level git directory with an optional argument to move relative to that directory. I've currently got this which works: alias ...
31
votes
7answers
25k views

zsh with Cygwin

How can I configure zsh to be the default shell under Cygwin?
9
votes
3answers
4k views

How to change the default shell in Cygwin?

I am trying to change my default shell from bash to zsh in cygwin. The normal unix command chsh isn't available on cygwin The etc/passwd file it seems isn't used anymore in existing versions of ...
0
votes
0answers
32 views

zsh git status shows all files in repo as modified (when they are no )

My setup: Windows 10, cygwin, miTTy and oh-my-zsh. Problem: when I get to a folder of a git repository it takes a long time (3-15 seconds) for the commandline to get to this folder. It depends on the ...
0
votes
0answers
19 views

Disable zsh prezto “completion” module autocorrect

I'm using prezto with zsh and its "completion" module has some autocorrect stuff which I don't want. I just want the autocomplete and menu highlights, but no autocorrection (which is dangerous and ...
0
votes
0answers
10 views

Somehow, I entered a terminal mode that changes keybinds' behaviour. What did I do?

I'm working in iTerm2 in OSX, running zsh. Somehow, I entered a mode where, among other things, Backspace did nothing and Alt-Backspace simply moved the cursor left one character without deleting ...
0
votes
2answers
58 views

Bitvise SSH Server putting extra spaces in session

I am using Bitvise SSH Server on my Windows machine for remote access. The login shell is ZSH, and I am using Oh My Zsh with it. However, I have also tried BASH and got the same problem. Therefore I ...
0
votes
0answers
7 views

Cannot change terminal title in zsh

I'm trying to update my iTerm2 terminal title using the command echo -ne "\e]1;this is the title\a" The title changes to this is the title but then refreshes back to ~ (zsh). Help is appreciated
3
votes
0answers
24 views

tmux text cut off by split line using iTerm2

I am using zsh, iTerm2, and tmux. When I split the window into multiple panes the line covers up a little bit of the text. Here's a picture of what it looks like: It works fine using terminal, so I ...
0
votes
1answer
23 views

How to leave the execute prompt in zsh

In a zsh, maybe I pressed Alt+X by mistake, but now I'm stuck and this execute: _ prompt won't leave. Pressing Ctrl+C do nothing, if I press Enter it tries to complete what I typed Pressing Enter ...
1
vote
1answer
59 views

Add strings to zsh tab completion for all commands and arguments

I want to add the keywords foo and bar to be added to the auto completion results for any command or argument. eg: cd <TAB> should give foo and bar in the suggestions in addition to the ...
2
votes
2answers
688 views

Is there a way to reverse-search zsh history with more than one search term?

I'd like to be able to reverse-search (CTRL+R) on zsh, but have the commands searched using more than one search term. For example, I'd like to search through commands that included both "scp" and "...
2
votes
1answer
57 views

Why does `zsh` insert a `~` when I press the delete key?

I have set my zsh to use vim style for editing command lines. However, when I use the Delete key, it inserts a ~ character. Have I misconfigured my zsh? How do I turn this off? Do I need to go ...
0
votes
1answer
127 views

Prezto Paradox theme not displaying properly

I have a question somewhat similar to: https://unix.stackexchange.com/questions/236885/installing-powerline-fonts-for-zsh-prezto-theme I'm on OSX 10.10.5 using Iterm2, Zsh, and Prezto with more or ...
4
votes
3answers
53 views

Periodically source shell profile

I'm a zsh user, but this should apply to any shell in theory. When I edit my .zshrc to add a new alias, I have to source ~/.zshrc in all of my open terminal tabs/windows to be able to use the new ...
0
votes
1answer
18 views

How do I get the aws cli completion to work with zsh on OS X?

Similar to this question: How do I get the aws cli completion to work with zsh on ubuntu? This command from the aws-cli documentation did not properly setup auto completion. source /usr/local/bin/...
2
votes
4answers
858 views

Disable zsh autocorrect entirely

How do you disable zsh autocorrect entirely? I am aware of the 'nocorrect' option which only applies to certain commands. But I want it off entirely so that when I type 'lear' instead of 'clear', it ...
1
vote
0answers
72 views

What is a close option in zsh to readline's `completion-prefix-display-length`

When completing, if the typed part is long, this option replaces the same part in the completion menu items with ellipsis. Especially useful if the typed part is long and there are many candidates.
1
vote
2answers
32 views

Import previous commands to edited command

I'm playing with zsh to change image modification time according to the 'Date/Time Original' exif attribute. For this I one command I do: PDATE=$(exiftool -p '$DateTimeOriginal' $PIC | sed 's/[: ]//...
1
vote
2answers
43 views

Zsh snippets implementation

Is there any way to implement expandable snippets in zsh? I'd like to be able to write ssh ssh_alias -t :tmux press tab and this would be expanded to the `ssh ssh_alias -t "tmux a||tmux" I want this ...
0
votes
0answers
4 views

How to show result of git reflog in the same window as the other commands?

When I type git reflog, the result is shown in another window like with man command (I don't really know how to call it). To quit the window you must use q key. How to show the result in the same ...
3
votes
2answers
53 views

How does dpkg know that a config file has been deleted?

I recently had an odd problem where I would install zsh (apt-get install zsh) but it would not install the config files - specifically /etc/zsh/zshenv and friends. Following some considerable time ...
0
votes
0answers
28 views

Bash in Conemu is overlapping lines

When I start nano/vi or a program that normally clears the screen then I can still see the command line. That means that the terminal is not cleared. If I scroll with the arrow keys the lines ...
1
vote
1answer
121 views

How to get bash-style autocompletion in zsh, (for git command)

I switched to zsh and find it better than bash, but I have a problem with oh-my-zsh's (hereafter "OMZ") autocomplete feature. When I type git chec, OMZ completes that to git check; in bash it gets ...
1
vote
2answers
208 views

Zsh autocomplete function with sed

I'm struggling to write an ZSH autocomplete function. My goal is to autocomplete ta's and tk's first argument with the projects listed in tmux list-sessions and tmuxinator list. Here's what I have so ...
0
votes
0answers
27 views

How do I send, through hotkey, a SIGINT (CTRL+c) to a process running inside tmux?

When I open tmux and start a long running process without output, how do I kill it with a hotkey Ctrl+c? On a normal zsh shell when I press Ctrl+c the process receives a INT signal and (hopefully) ...