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

learn more… | top users | synonyms

-2
votes
0answers
9 views

Zsh prompt function

why it's doesn't work? setopt prompt_subst autoload -U colors && colors git_prompt() { temp=`git symbolic-ref HEAD 2>/dev/null | cut -d / -f 3` if [ "$temp" != "" ]; then ...
0
votes
0answers
10 views

Can't use numbers and similar keys (0-9, -, etc.) in zsh without pressing fn?

Running zsh on a macbook air. Everything used to work normally until this morning - I don't even think zsh updated or anything like that. I can't type numbers, -, ., or / without holding fn. It does ...
0
votes
0answers
14 views

Is it possible to reuse functions I defined in .bashrc from zsh?

I am using bash on my Mac and I spent a lot of time customising functions in there. One things stops me from adopting zsh fully on Mac: I am not that proficient in zsh so I am pretty sure I can ...
0
votes
1answer
39 views

iTerm/zsh not reading .bashrc OR .bash_profile

In ~/.bash_profile I have : if [ -f ~/.bashrc ]; then source ~/.bashrc fi In ~/.bashrc I have some aliases When I load a new iTerm window, my aliases do not work. If I source ~/.bashrc they ...
0
votes
1answer
13 views

Alias options in zsh

When using the zsh alias command, what does the -s flag do (for example, lines 83-87 of oh-my-zsh's common-alias plugin?
0
votes
0answers
24 views

How to change default shell for a network user?

I am working with Ubuntu and I would like to change my default shell to z shell. I cannot use the chsh -s /bin/zsh or chsh-s /bin/sh myuser command since my user name does not exist in /etc/passwd and ...
2
votes
1answer
9 views

Zsh auto completion from man page

I noticed that fish has a feature to auto update auto completion scripts from man page. Does zsh have a similar script to do this?
0
votes
1answer
25 views

Is it possible to 'source' the output of a python script

I have a large python codebase that knows a lot about my working environment. I would like to use it to set up my ZSH session when i open a terminal window. The python script would output text that ...
0
votes
1answer
24 views

how to migrate bash prompt \#/\! to zsh

My bash prompt currently starts with the following variables : \#/\! which means \# The command number of this command. \! The history number of this command. So \# is specific to each ...
2
votes
1answer
67 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
41 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
20 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
21 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
18 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
58 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
12 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 ...
2
votes
0answers
25 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
28 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
48 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
20 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
62 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
29 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
30 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
33 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
29 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
19 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
53 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
25 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
26 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
35 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
193 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
204 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
12 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
89 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
118 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
21 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
62 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
17 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
147 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
13 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
41 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
1
vote
0answers
57 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
20 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
30 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
37 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
19 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
59 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 ...