zsh is a shell designed for interactive use, although it is also a powerful scripting language. Many of the useful features of bash, ksh, and tcsh were incorporated into zsh; many original features were added.

learn more… | top users | synonyms

11
votes
3answers
9k views

Can't make ZSH the default shell

I am trying to set ZSH as my default shell, however it keeps reverting back to bash. I have tried this code: sudo chsh -s $(which zsh) I've also tried: sudo chsh -s /bin/zsh Also tried these ...
1
vote
2answers
3k views

When I use ZSH, how do I set PATH in /etc/profile.d?

I'm using zsh as my shell, and I'm trying to configure my environment. I usually define my $JAVA_HOME variable by creating a file: /etc/profile.d/java.sh with the following content export ...
1
vote
1answer
27 views

Silence GUI Program's Terminal Output

I am running a zsh function to open a .tex file in vim, while opening its related .pdf file in evince. I am currently using xdotool to open a new tab in the current gnome-terminal window, and then ...
1
vote
3answers
59 views

List hidden files but exclude directories.

Is there a way to list files, but not directories, prefixed with a . (hidden files)?
1
vote
1answer
27 views

The display previous/next command shortcuts doesn't work

I read in some article that Ctrl+P - to display previous command Ctrl+N - to display next command But in my terminal it doesn't work. What might be a problem here? I really would like to display ...
1
vote
1answer
33 views

Kubuntu 14.10, .zshenv is sourced twice

I have added some directories into $PATH variable in my ~/.zshenv conf file. After reboot I noticed that these paths are appeared twice. I tried to print call stacks and got the following: .zshenv ...
4
votes
1answer
3k views

Error Password: chsh: PAM: Authentication failure when try to install Oh my zsh

I try to install Oh my zsh. After install zsh (sudo apt-get update && sudo apt-get install -y zsh) Then I install sudo apt-get install -y curl then install git. the problems occurs ...
2
votes
2answers
1k views

Git Branch in ZSH Prompt?

When working on a git repository with multiple branches, how do I modify my zsh prompt to include my current active branch?
1
vote
0answers
30 views

Where do I find the zsh manual in Ubuntu versions later than 12.04?

At the moment I am learning zsh based on recommendations from friends and colleagues. To my surprise I was unable to find the man page for zsh and a man page named zshmisc which apparently was ...
1
vote
2answers
2k views

Rerun previous command under sudo

I want to be able to run a command, it fails cause it doesn't have proper permissions. Then I can write "please" to sudo the command I just ran. Here's what I want to do in the terminal: $ run ...
1
vote
1answer
334 views

Reset Zsh config?

Yesterday I installed Zsh, and tried to configure some things, but somehow everything is messed up. A lot of commands do not work, I've done PROMPT in ~/.zshrc but it does not work correctly either. ...
12
votes
5answers
694 views

zsh man page documentation missing in packages?

I have a newly installed xubuntu 13.10 x64. I decided to install zsh via synaptic and make it my default shell. The installed zsh's version is: zsh 5.0.2 (x86_64-pc-linux-gnu). The installed zsh ...
0
votes
0answers
23 views

Problems installing Betty in zsh

I tried to install Betty in zsh like that: cd ~ && git clone https://github.com/pickhardt/betty echo "alias betty=\"~/betty/main.rb\"" >> ~/.zshrc source ~/.zshrc I installed her in ...
0
votes
1answer
442 views

oh my zsh for the root and for all user

I have installed zsh and I am using oh my zsh plugins for easily Everything works fine, but when I become a root user, it changes to the normal bash and sh what should I do to make the oh my zsh ...
1
vote
1answer
243 views

Changing the background of terminal in ZSH when connected to server

I use terminator as a terminal, zsh shell and oh my zsh, on both my laptop and my server, for what it's worth, I created an alias named vps to connect to my vps using ssh. Currently terminator ...
3
votes
1answer
2k views

Change the background color of command line in zsh when I change the prompt theme

I installed the zsh package. So, now when I type zsh in terminal it switches from back to zsh. Also, I downloaded the oh-my-zsh framework to customize zsh. When I change theme name in .zshrc file to ...
0
votes
0answers
53 views

<Enter> button does not work in Guake for zsh

I have 2 machines with Ubuntu 14.04 on them. On both machines I've tried to switch shell to zsh for Guake. As a result pressing button (to run a command) has no effect, although other ...
0
votes
1answer
32 views

Zsh typing problem

I just installed Zsh and wrote my own PROMPT thing so I have custom prompt. I also use emacs formatting in ~/.zshrc which says bindkey -e. Now when I open the shell, for some reason, it acts very ...
2
votes
1answer
46 views

Enable Zsh prompt username

So I just installed Zsh, and it shows for each command arrow and then ~. How do I enable my username@computername or something similar? I am reading https://wiki.archlinux.org/index.php/zsh but cannot ...
4
votes
2answers
818 views

Apt-get * wildcard with ZSH

ZSH: sudo apt-get remove --purge ubuntuone-* ERROR: zsh: no matches found: ubuntuone-* Works on Bash. What's the problem ? :-D
9
votes
2answers
1k views

Pressing enter produces ^M instead of a newline

For example, if I am tail -fing a file or reading user input, <Enter> will produce ^M in the terminal instead of ending the read or adding a newline to stdout. ^J works fine. I'm sshing into ...
0
votes
2answers
322 views

How to fix symbolic links after switching from Bash to ZSH

I had bash as my default shell even though I was only using zsh. I always started it myself by opening the terminal and typing zsh. Today I decided to use it as my default shell. So I found this ...
1
vote
1answer
65 views

Upstart sub-command tab completion with zsh

I've just recently switched to ZShell, and am loving it so far. One issue I'm having however is that my init.d or upstart scripts used to have tab completion for their subcommands, but now it doesn't. ...
11
votes
4answers
1k views

Configuring to detect if a command does not exist, suggest installation

Can the zsh shell be configured to show what bash shows when a command does not exist, similarly to this: kahless:~$ sysv-rc-conf The program 'sysv-rc-conf' is currently not installed. You can ...
0
votes
2answers
46 views

argument-aware alias command?

I want to create an alias for curl which automatically writes the file it curls into a file with the same name in the current directory. For example: % curl https://bootstrap.pypa.io/get-pip.py ...
0
votes
0answers
14 views

zmv:178: condition expected: $action

Tried to use the zmv function in zsh with the following syntax zmv -n '(*.*)(.*)' '${1//./ }$2' and got the following error zmv:178: condition expected: $action Line 178 in the zmv source ...
3
votes
1answer
2k views

How to run zsh and tmux with xterm-256color by default

I am using ubuntu gnome 14.04 and I want to have tmux and zsh opened when I start a new terminal. For now, in my preference of the terminal, I run tmux by default. In the ~/.tmux.conf file I have ...
2
votes
1answer
331 views

Can't set alias in zsh — command not found?

I'm trying to set alias conky-lua ="conky -c ./.conky/conkyrc &" so to start conky-lua. but when I source .zshrc it says command not found. A possible solution that I found on Stackoverflow is to ...
1
vote
2answers
737 views

Edit ZSH theme for virtualenv name

I use zsh theme intheloops. The theme looks like this when no virtual env. is active -- an empty line -- [sourabh@skynet] ~/Code/django_apps/cope (master) ⚡ ❯ and when an env. is active, (env ...
0
votes
0answers
29 views

Environment variable spoiled

In ~/.profile I have this: . "$HOME/projects/devenv.sh" In $HOME/projects/devenv.sh I have: BASEDIR=$(dirname $0) export APILIB_CONFIG="$BASEDIR/apilib.conf" echo "$APILIB_CONFIG" When I open a ...
14
votes
3answers
19k views

Setting up aliases in zsh

I know that in bash you can set up aliases in a .bash_aliases file so that the command you type doesnt need to be a command stored in the binaries in the system. Is there any way I can get aliases ...
0
votes
2answers
75 views

Why is this command starting endless terminals and how to make it work?

#!/bin/bash gnome-terminal --command='/home/user23/bin/n-youtube-dl "$1"' I want to pass the argument passed to this script to the other script started in the terminal. But this starts endless gnome ...
2
votes
1answer
554 views

npm completion broken

I'm running npm 1.2.18 and node v0.10.15. npm completion is broken. If I try to tab complete with npm or if I run npm completion, it displays: npm ERR! System Linux 3.11.0-14-generic npm ERR! ...
2
votes
1answer
120 views

Less output does not show output in terminal after quitting it

Previously, if I ran something | less, and then press q, it used to return me to the prompt with the output of less still visible. $ seq 1 100 | less 1 2 3 4 :q $ <prompt here. I can still see the ...
1
vote
1answer
221 views

tmux - unable to start any gui application

I am running Ubuntu-gnome 13.04. My default shell is zsh 5.0.0 and I usually run tmux 1.7 in the terminal 3.6.1. In terminal, if I evince or gedit, the applications start as expected. I can append an ...
1
vote
0answers
48 views

Make CronTab not asking for id_rsa keyword when running in terminal

I like to do some git pull inside a script and see see output of it. So I made up this cronjob to test: DISPLAY=:0 * * * * * mike /usr/bin/gnome-terminal -x zsh -c "/var/www/up.sh; zsh" ...
0
votes
1answer
64 views

What was the meaning of a special character on the shebang line?

I saw a script like below, #! /bin/zsh - del=10 rm -f /mnt/md0/capture/DCN/*(ND.Om[1,$del]) What was purpose of adding - on a shebang line?
101
votes
10answers
36k views

Moving from bash to zsh

I'm considering moving from bash to zsh as I often come across posts praising zsh. I'm an experienced command line user and I'm assuming the basics are pretty much the same, so I'm looking for advice ...
1
vote
0answers
125 views

Scroll mouse -> scroll up screen instead browse history

I'm new with Z-Shell, I got a problem that when I scroll my mouse, it shows me the zsh-history, but what I really wanna is to scroll up the screen, just like I drag the scrollbar on the side. seems by ...
2
votes
1answer
2k views

Shell Prompt Customization?

I have used oh_my_zsh (and tinkered with bash_it) on multiple systems and have generally been happy with it, though I hate it's auto-correction feature and generally turn it off. My usual shell is ...
1
vote
1answer
625 views

zsh: command not found: svn_prompt_info

I install the oh-my-zsh through the gist https://gist.github.com/tsabat/1498393 However, whatever command I typed in the shell, the execute the command then print "zsh: command not found: ...
3
votes
2answers
149 views

zsh doesn't open vim or gvim until terminal is closed [closed]

When I try to launch vim or gvim from the terminal (or a program tries to do it such as git rebase --interactive). It doesn't open until the terminal closes, it just sits there thinking the program ...
0
votes
2answers
200 views

zsh up-line-or-history does not work in gnome-terminal and tmux

I use Ubuntu 13.04, zsh with oh-my-zsh and up-line-or-history is bind to up arrow (default settings of oh-my-zsh). But this work only in urxvt. I try to use DEBIAN_PREVENT_KEYBOARD_CHANGES in my ...
0
votes
2answers
2k views

changing shell from zsh to bash

My web server was tampered by someone who was using zsh shell. I feel more comfortable using bash shell, as that's the defaults that come with Ubuntu and OS X (the two main operating systems I use). ...
0
votes
1answer
40 views

Customise the prompt and display the Battery Capacity?

How do I customise the zsh-Prompt to show for example the time, the wi-fi status and the Battery Capacity? Is it possible to see my current battery charge in the prompt? I have only found a way how ...
0
votes
1answer
275 views

zsh aliases doesn't work from .zshrc file

I want to create an alias to mount some remote file systems locally. I placed lines like this in my .zshrc file: alias remfs='sshfs rem: ~/mnt/sshfs/rem' But when I run remfs, I get an error ...
6
votes
3answers
5k views

Change default shell for Terminator

I want to change the default shell of Terminator to zsh. In /etc/passwd/ I've changed the default shell to /bin/zsh. This settings changes the default shell in LXTerminal (the default terminal on ...
6
votes
1answer
3k views

ZSH is not launched while opening a new terminal with `gnome-terminal`

I am using Ubuntu 12.04 and started using zsh. The way I changed my shell is $ sudo chsh -s /usr/bin/zsh I changed my prompt theme etc and the changes kicked in. When I do a echo $SHELL I can see ...
0
votes
1answer
105 views

Getting a deb with wget problem

I'm trying to get Anki like this: wget https://anki.googlecode.com/files/anki-2.0.12.deb (That's the latest version) gives me: zsh: no such file or directory: wget ...
3
votes
3answers
3k views

Add directories to $PATH without repeating yourself

My shell is zsh and OS is Ubuntu 13.04 I need to add directory to $PATH to make it work in following places: In graphical environment(Unity) (such as startup applications, gmrun program that runs ...