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

learn more… | top users | synonyms

0
votes
1answer
8 views

How to remove zsh alias?

I have an alias which is predefined by an oh-my-zsh plugin. -> % alias gcm gcm='git checkout master' I'd like to remove it, i.e. I'd like alias | pcregrep "\bgcm\b" return 1. I've tried with ...
7
votes
2answers
2k views

How can I make zsh's vi mode behave more like bash's vi mode?

I am really liking the general speed of zsh, but two things are annoying the heck out of me. I have to hit wait a moment between hitting escape and hitting slash to get to the history search (if it ...
0
votes
1answer
9 views

Tried Installing ZSH through cygwin and then trying to use zsh through Cmder

I tried to install Cygwin (64 bit version) on my computer, and it went through hunky-dory until at the very end, autorebase.bat failed with exit code 1. I read through the logs and they weren't too ...
1
vote
1answer
10 views

Where should I place environment-dependent configurations for zsh?

I have a repository on github that consists of most of my dot files, including files like .zshrc. When I need to move to a new development environment, I just need to pull my dot files from github ...
0
votes
1answer
517 views

How do I get zsh's autocomplete to complete wildcards like bash does?

In zsh and in bash, if I type ls c<TAB> it displays every filename starting with c. If instead I type ls c*<TAB>, bash behaves the same way, but zsh replaces the c* with the list of every ...
0
votes
1answer
166 views

zsh handlers like command_not_found_handler()

I'd like to format the zsh output. eg for unfound functions I now have: function command_not_found_handler(){echo $fg[red]"\033[4m???\033[0m"$fg[red]" Command \"$1\" not found."} which returns red ...
0
votes
0answers
20 views

Git add file path completion not working with zsh on OS X

When trying to tab complete files with git add <partial-path><tab> the completion hangs. I have to quit it with ctrl-c. This is also the case for git rm. All other zsh tab completion seems ...
12
votes
2answers
4k views

Resume Zsh-Terminal (OS X Lion)

OS X Lion has "Resume" feature, i. e. when you reopen an app it restores all windows and their contents. That works for Terminal as well. But if you use Zsh instead of Bash it doesn't restore opened ...
2
votes
2answers
4k views

Oh my zsh on windows

I have installed Cygwin on my windows 8.1 Now I want to install ZSH and Oh My ZSH in cygwin. I have installed ZSH in it by selecting Shells > Zsh in Select screen. and I found this link to ...
0
votes
1answer
21 views

Input accents in iTerm with international keyboard

I have an international keyboard where accents are inserted doing ALT+` e ==> è ALT+e e ==> é In Terminal.app this works correctly, in iTerm2 it doesn't. I get a bell sound when I ...
1
vote
1answer
28 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 ...
0
votes
0answers
34 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 ...
2
votes
2answers
854 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 ...
0
votes
1answer
28 views

Do I have to manually update my PATH in Cygwin shells?

I use Cygwin on Windows 7. I'm not really a Windows user, so it's already a little inconvenient for me to have to have this extra layer in between my OS and Zsh, my shell of choice. Now, I frequently ...
0
votes
1answer
20 views

Switch from ZSH to default OS X

http://stackoverflow.com/questions/13476232/make-iterm2-launch-with-zsh I used chsh -s /bin/zsh as described above to set zsh as default. I'd like to switch back to default standard terminal that ...
2
votes
2answers
53 views

sed error when launching terminal on OS X

I get these error messages when launching bash or zsh in standard Terminal.app or iTerm2 sed: 1: "\#^system_type=# { s#^s ...": extra characters at the end of p command sed: 1: "\#^system_type=# { ...
1
vote
2answers
26 views

How to exclude a file from a command with ZSH?

Given this directory content : one.file two.file three.file in bash, when I enter rm *.file !(two) only one.file and three.file are deleted. How can I do this in ZSH?
2
votes
1answer
27 views

PATH set before /etc/zshenv

I am trying to find which file adds /opt/texbin folder to my PATH variable on Ubuntu. It is not present in my /etc/environment file. sudo grep -lr texbin . 2>/dev/null outputs nothing in the /etc ...
3
votes
1answer
184 views

Is there anyway to color `git push` output?

I've tried using: stderred, https://github.com/sickill/stderred colors in git, http://scie.nti.st/2007/5/2/colors-in-git global config color.ui=true. Though the output from git push on error is ...
2
votes
2answers
45 views

How do I handle multiple quotes in an alias (for bash or zsh)

I am using zsh, and I am trying to use python as a simple calculator. I'm very familiar with python, but can't seem to get the alias (or function) to work properly. So far I've got: pycalc() { ...
37
votes
6answers
16k views

How can I make tmux use my default shell?

On a new setup, tmux is using bash instead of my default (zsh). How can I force it to use zsh?
0
votes
0answers
28 views

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

I installed aws console cli following the instructions here: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html#install-bundle-other-os I want to get completion working ...
15
votes
9answers
5k views

Zsh: Open a new tab in the same directory

Say you are in /very/cool/and/deeply/nested/folder . And you want to open a new terminal tab in the same folder. How would you do that? I use Mac OS and Zsh.
5
votes
3answers
16k views

How to delete files on the command line with regular expressions?

Lets say I have 20 files named FOOXX, where XX is the number of the file, eg 01, 02 etc. At the moment, if I want to delete all files lower than the number 10, this is easy and I just use a wildcard, ...
1
vote
0answers
27 views

Strange Unicode behavior in xterm

I recently switched my system from ISO-8859-15 to UTF-8 (I know I am a little late), works fine so far, I am just having a little issue with xterm and zsh. When entering German - Umlaute (ä,ö,ü) and ...
3
votes
1answer
54 views

Using sed with parallel gives empty output when redirecting to file

I'm using the zsh shell. I am trying to use sed to substitute some text in many files, using parallel to speed up the process. When I tested this on one file and let the command output go to stdout I ...
3
votes
2answers
246 views

Always run a command after another command

With zsh (and oh-my-zsh), is it possible to always run a command after a certain other command? I want to always run an ls after cding to a directory, rather than running cd example; ls every time. I ...
0
votes
2answers
121 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 ...
3
votes
3answers
529 views

Zsh, directory tab-completion with prefix

I have a directory where I put all my projects in, let's say it's ~/projects as an example. I've made a command called s which takes one argument, and moves me into that directory. E.g.: s foo moves ...
1
vote
1answer
30 views

Speeding up explorer.exe global shortcuts [duplicate]

I'm running Cygwin on windows with cmder as a terminal for zsh. The way I got it to be a bit similar to what my linux setup has is I placed a shotcut (.lnk) on my desktop with a keyboard shortcut ...
4
votes
2answers
160 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, ...
2
votes
1answer
18 views

How to bind Control+apostrophe via bindkey in zsh

There is way to bind Control+apostophe via bindkey? I have tried: bindkey "\C-'" bindkey "^'" bindkey "\C-\x27" and all of this is not working
1
vote
1answer
13 views

Odd issue with OR operator in zsh

I'm seeing an odd issue with CentOS 6.4, zsh 4.3.10 (x86_64-redhat-linux-gnu). This is running two regular expressions on the same string. Neither expression passes the if conditional, but when I OR ...
0
votes
0answers
33 views

Why is there a bash process running in my Terminal if I use Zsh?

When I run the "top" command on OSX Mavericks, a bash process appears even though I am using Zsh, why?
0
votes
1answer
58 views

Adding a jar file to CLASSPATH is still not executable

Perhaps I just don't understand how the whole CLASSPATH environment variable works when trying to find .jar files on your system. I thought if you specified it, you could launch .jar files with java ...
1
vote
1answer
23 views

How do I replace a specific argument of a previous command in zsh?

Let's say I have the following command: /long/path/to/bin -a foo -b 2 -c 3 -d 4 foo | gunzip -c | less And now I want to replace foo behind 4 with bar, so it becomes: /long/path/to/bin -a foo -b 2 ...
1
vote
3answers
49 views

How do I properly install and organize terminal software on OS X?

I've been learning vim and messing around with installing certain terminal extensions like zsh and tmux. So far I've been installing everything according to their online instructions, and this has ...
0
votes
0answers
53 views

When opening Terminal: “NO LOGINS: System going down at 01:10”

I'm trying to get a terminal open, and I get this message: NO LOGINS: System going down at 01:10 Login incorrect login: *myname* Login incorrect login: It doesn't prompt for my password. This ...
25
votes
3answers
6k views

How to partially disable the zsh's autocorrect

The autocorrection function of zsh is very helpful for me but it does't always gives a proper result. ~$ sudo vim somefile zsh: correct 'vim' to '.vim' [nyae]? Yet what I want is something like ...
0
votes
0answers
19 views

zsh not finding new applications in PATH [duplicate]

In my path, I have rbenv shims followed by /usr/local/bin, then /usr/bin. Whenever I install a new version of ruby using rbenv, applications such as gem and bundle should automatically be find first ...
2
votes
1answer
79 views

In zsh the date format for names isn't displayed properly

I don't know what's wrong or if I'm stupid or something, but I just can't get to display the date with words :( I've been trying this for hours now.. It should display Mon, but it displays a "M" ...
0
votes
1answer
41 views

bypass 'noglob' for 'which' in zsh?

I want to use the 'which' command to see which executable is actually being invoked, but the defensive 'noglob' aliases keep getting in the way. Is there a shortcut that I can use to find which ...
0
votes
1answer
81 views

OSX: Operation not permitted

on my mac os system (v. 10.9.3) I wanted to uninstall my zsh so first of all I executed the uninstall script in zsh. This failed so I wanted to delete the affected files by my own and am stuck here. ...
13
votes
9answers
3k views

Cygwin/Git Bizarre Terminal Issue

Alright, this is weird. First off, this is mintty running on up-to-date cygwin, with git pulled from cygwin's setup.exe. I am running zsh. $ git clone ...
1
vote
0answers
59 views

Need to reset OS X terminal AFTER logging out of Ubuntu (ssh + zsh)

I have a problem I cannot understand, and cannot debug for the life of me. I run Mac OS X 10.9.2 (latest) and use Terminal.app and zsh as my shell. A server I work remotely on runs Ubuntu 13.04 and ...
0
votes
1answer
190 views

mac os x byobu vertical split using iTerm, tmux, zsh

How to get vertical split on Mac OS X in byobu? Ctrl + F2 is not working. It open new window instead of spliting the current. In oposite spliting horizontaly with shift + F2 works ok.
1
vote
1answer
322 views

Colored man pages but git --help is not in ZSH

I have colored man pages according to: alias man="TERMINFO=~/.terminfo/ LESS=C TERM=mostlike PAGER=less man" so man less looks like but git blame --help is uncolored
1
vote
2answers
37 views

How do I unset (undo) unix set -C in zsh?

This works as expected $ echo "foo" > foo $ cat foo # foo $ echo "updated" > foo $ cat foo # updated From man set -C If set, bash does not overwrite an ...
2
votes
1answer
35 views

Dynamic directory hash

There's a nice method in zsh called hash -d with example usage: hash -d magic=/very/long/name/$USER/even/more Then I can cd ~magic/deeper. Is it possible to achieve the same result but so that ...
0
votes
1answer
38 views

Tmux printing ^P

My terminal has recently started printing control characters (e.g. ^P or ^N) when I press Ctrl+P (or other combinations). I'm not sure what caused the change. Here is my .tmux.conf file. Any ideas? ...