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

learn more… | top users | synonyms

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 ...
0
votes
1answer
15 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.
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:...
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 ~ ...
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
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 ...
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 ...
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 ...
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 ...
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
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 /...
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
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 ...
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
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 ...
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.
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/...
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 ...
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
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 ...
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 ...
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) ...
1
vote
1answer
28 views

can't find zsh history on OSX 10.8.5

When I log into the Terminal app on OSX my default shell is /bin/bash. Entering echo $HISTFILE points me to /Users/monkeybrain/.bash_history and head $(echo $HISTFILE) shows me that the file contains ...
1
vote
1answer
15 views

zsh completion doesn't work when prepending to word

I have two versions of a certain application, the one in my PATH and one at ~/install/app. So normally I do app file But sometimes I want to do, right after that: ~/install/app file With bash I ...
3
votes
1answer
285 views

iTerm 2 ZSH colors/themes not showed correctly

I have a clean installed mac, running OS X 10.11.4. I have installed iTerm 2, and set it up to use oh-my-zsh. I'm trying to set up a theme for my iTerm. I am trying to use the avit theme. It's ...
0
votes
2answers
55 views

What exaclty is <() in bash (and =() in zsh)?

I'm pretty confortable with bash, but recently I ended up in a substitution I didn't know. What exactly is <(<command>) in bash? How does it compare to the =(<command>) in zsh? I ...
1
vote
1answer
85 views

Unable to login as root or as user because zsh is missing

I installed zsh on my raspberry pi and for various reasons including the fact that the shell completely slowed down, I decided to remove it. I uninstall the package, changed the shell back to /bin/...
0
votes
0answers
56 views

.hushlogin but for all folders in iTerm2 / oh-my-zsh

I updated to iTerm v3 beta, and now when I open a new tab with the same location of the previous tab, it shows the Last login MOTD if it's any folder other than ~/. I've read quite a bit about doing ...
1
vote
0answers
37 views

Error when trying to exit terminal emulator

Background I run zsh by default, and spend most of my day logged into a terminal. My workstation and all of the servers I interact with on a daily basis are Linux-based, and I either use zsh or bash ...
1
vote
1answer
24 views

zsh autocomplete results from function

I've been searching and searching and unable to find a clear way to do this: Slightly contrived example to hide details: Say I want to autocomplete tmux session names with a command that will open ...
0
votes
1answer
18 views

Tab glitch with tmux in archlinux

Bug difficult to explain, as it can have extremely random effects. But the idea is : when I open a new tab in my terminal using tmux (in tig, vim or cmus for exemple), the text always gets extremely ...
0
votes
0answers
12 views

zsh: enable normal path expansion for git commands

In zsh, I can expand a filename by just typing the first letter of each directory in its path and hitting <TAB>: % ls /e/z/zshe<TAB> % ls /etc/zsh/zshenv This works as long as the ...
1
vote
0answers
53 views

Running GNU Screen on Raspbian with vertival split spilling content

I am running Screen on a Raspberry Pi. My shell on the Pi is ZSH with OH-MY-ZSH. I have connected to the Pi via SSH from a Mac. When I run certain commands like HTOP or Vim the output spills over to ...
0
votes
1answer
61 views

git commit hash in zsh prompt

I'd like to see the current commit hash (just the first 8 or so characters) in my zsh prompt. I have this so far: https://github.com/calebmeyer/cpm-zsh-theme/blob/master/cpm.zsh-theme#L3 ...
0
votes
0answers
34 views

Weird output when setting zsh prompt

I am setting my zsh prompt to be % by setting the BULLETTRAIN_PROMPT_CHAR variable in my .zshrc file but when it starts up the prompt is %f. I have tried \% and it still does the same thing. Note I am ...
1
vote
0answers
25 views

zsh read input in zle widget

I am trying to implement a custom version of zsh history search when pressing ctrl-r (although my function will map to different shortcut). So far I have tried to use read , vared and read-command to ...
0
votes
0answers
36 views

Selecting a group in a pattern on ZSH Glob

How can I select a group in a ZSH pattern to be used later in a substitution or a reference? Example: print the files matching a given pattern and followed by a substring of that name selected from ...
0
votes
1answer
50 views

Dumping current .zshrc from terminal

I've wanted to make quick edit in a .zshrc, but vim said that it can't be written or something. So I quit, with :q!. Then I wanted to reopen this file... and it was empty. I still have terminal open ...
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
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 ...
2
votes
1answer
68 views

zsh: What does hist_find_no_dups mean?

HIST_FIND_NO_DUPS When searching for history entries in the line editor, do not display duplicates of a line previously found, even if the duplicates are not contiguous. However, when ...
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 ...