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

learn more… | top users | synonyms

0
votes
2answers
34 views

zsh config - to export or not to export?

When setting variables in my ~/.zshrc I can either use export export PATH=/some/path or not PATH=/some/path How do these differ and which should I use?
1
vote
1answer
19 views

ZSH Quote escaping and expansion

I am trying to run tmux, passing several commands at once, and I'm unable to properly quote the string. The command succeeds when manually entered on the command line: ~% /usr/local/bin/tmux ...
1
vote
1answer
23 views

bind ctrl+insert in zsh?

What key combo do I use to bind ctrl+insert in my zshrc? I tried entering quoted-insert mode (ctrl+V) but pressing ctrl+insert does not output anything.
2
votes
1answer
46 views

How can I open an application using the command line and then close the terminal without closing the opened application?

If I open an application from the command line, say Firefox, the application runs as long as the terminal stays open. Closing the terminal's tab will close the application. Is there a way to open an ...
0
votes
1answer
19 views

Macports installed applications no longer showing up

I recently migrated my shell over to zsh from bash on my os x computer. I obtained zsh from macports, updated my default shell on os x, and restarted. When I tried to use port both shells said they ...
0
votes
1answer
20 views

ZSH, colourify & autocompletion

I have zsh with oh-my-zsh, I added an alias to color the make output using alias make="colourify make" but when I use it, make autocompletion does not work anymore. If I use unalias make, the make ...
2
votes
0answers
26 views

Add sound to keystrokes in iTerm2 / zsh

I've been searching for quite a while now, but haven't found anything. I want to spice my terminal up a bit more than just colorizing it – I also want to add specific sounds to keystrokes, newlines ...
1
vote
2answers
30 views

Only complete command names if no file name completions exist

Reasoning: I have autocd enabled, yet I never use it because it makes tab-completion a huge pain, as every single command name on my system will be completed along with the filename completions. ...
0
votes
1answer
31 views

I can't see colors in zsh through SSH

I recently moved from bash to ZSH and oh-my-zsh (which is so far wonderful) and installed it in my desktop, laptop and hosting (dreamhost) with a theme called agnoster. I also installed solarized and ...
2
votes
1answer
30 views

What is the bash equivalent of zsh vared command?

I saw that with zsh vared you can edit on the fly the specified environment variable. Is there an equivalent command for bash? Thanks
2
votes
1answer
44 views

Edit Current Command in Zsh Vi Mode

So I know that you can set vi mode in bash with set -o vi I also know that you can set vi mode in zsh with bindkey -v The vi mode in bash has a great feature that allows you to edit the command ...
0
votes
0answers
34 views

Advantages of moving to zsh? if using bash in emacs shell? [closed]

I've read lots about great things from zsh. The big hangup for me was that I occasionally use the bash shell within emacs. I realize that there's some tweaking to make this work, such as: zsh ...
0
votes
0answers
26 views

Use zsh completion in vim instead of vim one

I like zsh completion where for example I can write f/o/fTab and get folder/other_folder/file.txt (I'm not sure, it's possible feature of oh-my-zsh, not zsh, but it seems that it doesn't matter) Also ...
0
votes
1answer
25 views

Invoke zsh, then *source* another file (while entering interactive mode)

This question is of course related, but different to the one about executing a command. That questions’ solutions involve either starting a subshell – which isn’t possible due to the requirement of ...
1
vote
1answer
28 views

Can I make zsh expand tildes in double quotes?

Ever since I discovered you can use filename completion in double quotes, I've been using it for files with spaces in their names (like /Library/Application Support). It looks nicer and is easier to ...
2
votes
1answer
42 views

How to bind function keys in zsh?

Does anyone know how to bind function keys in zsh? I want to be able to use function keys in programs running in my terminal, not bind them to some function in zsh. I've tried putting bindkey "\e[OP" ...
0
votes
0answers
13 views

How can I use bindkey and zle in zsh to change a control key plus numbers to a variable string?

I use a set of shell scripts called SCM Breeze to give me an enhanced git status. It marks files in my git status with numbers that are set to variables, i.e. $e1, $e2, and $e3 can be used to ...
1
vote
2answers
35 views

How to prevent zsh from showing environment variable name instead of current path?

I'm using "oh-my-zsh". I have an environment variable set to the current path, let's say: PROJECT=/home/me/projects/client/project and my zsh prompt looks like this: me@my-machine:~PROJECT$ ...
2
votes
1answer
44 views

How to disable zsh tab completion for NFS dirs?

I use zsh and its tab completion. When I accidentally hit tab in a (slow) NFS dir, zsh takes way too long. Even worse, if the NFS is down, and I hit /mnt/[tab], my whole shell locks up. How can I ...
0
votes
1answer
48 views

Putting the “canonical” working directory in a zsh prompt on OS X (iTerm 2, if that matters)

I use zsh and oh-my-zsh for my shell environment on OS X, and I'm having a hard time tracking down whether or not the thing that is happening is a result of an oh-my-zsh function or the default ...
0
votes
1answer
30 views

Searching thought history with up and down arrow zsh

When I first switched to ZSH when I would use the up arrow key to move through history it would filter the history based on what I had already typed so if I type mysql and then up I would be stepping ...
0
votes
2answers
78 views

Using wildcards in commands with zsh

Using commands such as rsync and scp with ZSH I've run into trouble. Instead of the (normal) behaviour of giving me all matching files, it won't run and returns: ➜ ~ rsync -azP user@server:~/* ~/ ...
0
votes
0answers
18 views

ZSH not finding commands [duplicate]

I've noticed several times that zsh can't find commands when running pipes, e.g.: ➜ ~ ps aux | grep terminal zsh: command not found:  grep ➜ ~ curl -L ...
1
vote
1answer
31 views

how to make ctrl+p behave exactly like up arrow in zsh?

First of all, I am using zsh and oh-my-zsh with nearly no other customization. In zsh, when I press up-arrow, it brings me the latest commands. And if I typed some characters before I press up-arrow, ...
3
votes
0answers
55 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 ...
1
vote
0answers
14 views

autocompletion of .. from a symlinked path

Say I cd to a symlink then try to tab-autocomplete on top of ../ $ mkdir /foo/bar $ ln -s /foo/bar /baz/bar $ cd /baz $ cd bar $ cd ../{tab} In bash, autocomplete presents me with the contents of ...
1
vote
1answer
23 views

ZSH glob expansion without menu

I'm trying to configure zshell in such a way that: $ ls *<TAB> # results in ls a b c d e f g <cursor> where "a, b, .., g" are the files that match the wildcard. Instead it gives me the ...
2
votes
2answers
46 views

How to look at the past directory history the shell was in?

Sometimes I like to look back in the command history to figure out what I was doing. Sometimes it would help to know what the cwd was for each command. So, I'm wondering if there's some way to track ...
0
votes
0answers
28 views

ZSH list completions after unambiguously tab-completing a directory

Better shown through example, here is the desired behaviour: ~/documents/doc1.txt, ~/documents/doc2.txt, and ~/downloads exist. The user types: vim ~/doc<TAB> Because this completion is not ...
1
vote
1answer
42 views

zsh fail to expand apt-get regex?

zsh seems to fail expand apt-get regular expression. For instance I would like to install all packages that has the prefix llvm-3.1, and I use: sudo apt-get install llvm-3.1* But zsh tells me that: ...
0
votes
1answer
61 views

ZSH show completions without pressing tab like vim's ctrlp?`

Is it possible to update zsh's completion list with each key typed for commands that take a file/folder as a parameter (e.g. cd). In other words for these kinds of commands, the tab key would be ...
2
votes
1answer
55 views

Adding a specific binary (zsh) to the $PATH?

I have installed a more recent version of zsh using homebrew, located at /usr/local/bin/zsh. which zsh returns /bin/zsh. How can I make /usr/local/bin/zsh the default, without adding the entire ...
0
votes
0answers
65 views

Can not bring a background running vim to foreground?

If I have a vim running in the background, it seems that I can not bring it back to foreground. Do you have any idea, why?
1
vote
1answer
384 views

What are the differences between oh-my-zsh and prezto?

I understand both Oh-My-Zsh and Prezto are a collection of files meant to assist setting up your zsh (Z Shell) configuration. Could someone please explain what they're doing that is different to the ...
0
votes
0answers
21 views

zsh start message

Why did I start to get this verbose messages when I start zsh? Haven't changed my zsh profile lately. Using iTerm2 on OS X ML. Apple_PubSub_Socket_Render=/tmp/launch-jMO12e/Render ...
0
votes
0answers
19 views

zsh $RPS1 always get replaced

I just switched from bash to zsh for its great completion system. Recently I'm trying to add vcs_info to RPS1, but even if it is set at the end of ~/.zshrc, it still gets replaced to something like ...
0
votes
0answers
47 views

Start new zsh interactive shell and then run a command [duplicate]

I've needed this in several places, I'm surprised it doesn't exist, and I haven't found an adequate workaround. I need this for several reasons, but the ones I can remember off the top of my head ...
0
votes
2answers
51 views

How to deal with the shell input before it executed in Bash or zsh? [closed]

everyone. I am a bash/zsh user(Linux). I want to realize the following things. First, input the command in the bash/zsh shell, like: $ wonderful: In fact, a program named `wonderful:' doesn't ...
0
votes
2answers
46 views

Silent cd using cdpath with zsh?

When using cd to navigate to a path found by cdpath that is not located relative to ., the resulting path gets echoed. For example, assuming a directory structure like ~/parent/child and a cdpath like ...
1
vote
0answers
67 views

zsh - prompt redraw after executing command

I just started using zsh and I'm configuring a few things. I've chosen the vi bindings as I'm more familiar with those. As many people before me, I soon found it would be useful to have some visual ...
0
votes
3answers
73 views

Break out of nested functions in a shell

If I have a series of nested functions, how can I break out of all of them from the innermost function? EDIT: Busy looking into the builtin 'trap'...
2
votes
2answers
48 views

Put a command in history without executing it

In bash, if I have a command on the line, and I press Alt-# (with the cursor anywhere on the line), it adds a # to the front of the line, commenting it out, 'executes' it (which does nothing since ...
1
vote
2answers
119 views

zsh prompts to correct executable when running bundle exec

why does zsh ask to correct rspec to spec when running bundler? ✗ rspec --version 2.12.2 ✗ bundle exec rspec --version zsh: correct 'rspec' to 'spec' [nyae]? n 2.12.2 system: ubuntu 12.10 using ...
1
vote
1answer
77 views

zsh history up-arrow history completion not working

I am not able to get the zsh history keybindings to work the way I'd like. I'd like to be able to type sudo and then use the up arrow to scroll through all history commands with the prefix sudo. I ...
2
votes
1answer
167 views

How do I change my default shell on a remote server?

I tried changing it the way recommended in How do i change my default shell from bash to zsh?, as shown below: chsh -s $(which zsh) but that gave me an error. The system asks me to use ypchsh ...
1
vote
2answers
142 views

vim backgroundcolor in tmux - how to force zsh to use screen instead of xterm in tmux

I am having the same problem like the questioner in 256 color support for vim background in tmux. In my normal terminal with zsh, I have no background color issues in vim, but when I run it inside ...
1
vote
1answer
32 views

How to source zshrc from bash script

I have a script written in bash that sets up my zsh config and changes current user's shell to zsh if needed/possible. After default shell is changed, I want zsh to load my new profile, but when I do ...
0
votes
1answer
66 views

zsh - variable assignment isn't working

I have this line in a function I'm adapting from a bash function into zsh function: local info=( $(command df -P $fs | awk 'END{ print $2,$3,$5 }') ) Whenever I call it in the func I get this: ...
5
votes
2answers
56 views

Aliases with numerical names

I just installed Oh My ZSH on my Mac. Everything is working great, except I can't define aliases with numerical names. If I execute alias 5="cd ~/Projects/Projectname/" 5 I get the following error ...
1
vote
1answer
63 views

Remove path until slash when typing in terminal

For instance, when I type a path in terminal cd project/example/one I can press Ctrl+W and remove the entire "word" project/example/one. Sometimes it's not very useful. Are there any shortcuts for ...

1 2 3 4 5 8