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 ...
0
votes
1answer
5 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 ...
0
votes
1answer
9 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
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 ...
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 ...
0
votes
1answer
27 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
26 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 ...
2
votes
2answers
44 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() { ...
0
votes
0answers
24 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 ...
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 ...
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 ...
1
vote
1answer
28 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 ...
3
votes
1answer
52 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 ...
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
57 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
48 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
49 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 ...
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 ...
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
80 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. ...
1
vote
0answers
58 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 ...
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? ...
2
votes
3answers
240 views

How do you set alias sudo='nocorrect sudo ' correctly?

Until Recently I had alias sudo='sudo ' in my .zshrc file. Today I ran into this error on trying to do sudo mv: ➜ ~ sudo mv nginx.conf.orig nginx.conf.orig2 sudo: nocorrect: command not found Now ...
0
votes
1answer
33 views

zsh and Ruby print issue

Has anyone come across an issue where Ruby's print method leaves behind a % at the end of the line using zsh? I'm using oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh) with iTerm2. Here is an ...
0
votes
1answer
189 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
64 views

Zsh autocomplete function with sed

I'm struggling to write an ZSH autocomplete function. My goal is to autocomplete ta's and tk's first argument with the projects listed in tmux list-sessions and tmuxinator list. Here's what I have so ...
2
votes
1answer
248 views

zsh (z shell) numpad/numlock doesn't work

I just upgraded to zsh/oh-my-zsh. Almost immediately I notice on my machine that the 10-digit numpad is not working. It was working in bash and fish shell. Oddly, if I hold down the fn/function key ...
1
vote
1answer
34 views

What is the ZSH equivalent of 'expr'?

The expr utility evaluates an expression and writes the result on standard output. What is the canonical ZSH way to evaluate an expression, and print the result? Solution: I believe the answer is ...
0
votes
0answers
42 views

Using <ctrl+arrow> with zsh within (byobu-)tmux within gnome-terminal

I already added the following lines in my profile.tmux configuration file: TERM=xterm-256color set -g terminal-overrides "xterm*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@" unbind C-Left ...
0
votes
1answer
60 views

Disallowing windows to rename themselves in tmux

I've installed tmux on an OS X system with zsh provided by oh-my-zsh. I usually use quite a number of tmux windows for a whole bunch of ssh sessions, and I like to keep these windows named after the ...
0
votes
0answers
87 views

How to restore my iterm2/zsh session after restart?

I use oh-my-zsh with iTerm2 on osx and I'd like them to retain the same tabs with the same directories and hopefully the same textual history after a restart. Currently after a restart iTerm reopens ...
3
votes
1answer
195 views

Iterating over keys (or k/v pairs) in zsh associative array?

In zsh, I want to iterate over an associative array. I need both keys and values. But when I iterate over the associative array normally (for x in $assoc_array), I get only values. All examples ...
2
votes
1answer
74 views

zsh tab completion to run scripts in current folder (.<TAB>scr<TAB>)->./script.sh

I have an issue with zsh (or oh-my-zsh): When I want to run a script in current directory, I do ./script.sh. In bash I could do .<TAB> and it would give me ./ where I could continue typing the ...
1
vote
0answers
60 views

OSX Mavericks .zshrc cannot source

I am trying to source my zshrc. It sources fine when before I add this line: . ~/Dropbox/configs/aliases Then I get this: /Users/mkrell/.zshrc:.:13: too many open files: Dropbox/configs/aliases ...
2
votes
1answer
171 views

What's the ZSH equivalent of BASH's $PROMPT_COMMAND?

BASH supports a $PROMPT_COMMAND environment variable that defines a command to be executed before any first-level interactive prompt. I'm looking for a ZSH equilvalent of that. The documentation says ...
0
votes
2answers
90 views

Parse Git Branch Stopped Working (OSX)

I use a method called parse_git_branch which is called by my PROMPT. I'm using zshell, but I don't understand why this would stop working. Here's the function: parse_git_branch() { ...
0
votes
2answers
82 views

git using different version of vim than zsh

I've got a plugin called YouCompleteMe installed in vim. When vim starts with this plugin installed, it will raise a warning if the version of vim is under the minimum required. I'm using vim ...
0
votes
1answer
35 views

mdfind -onlyin not working in hidden directories recursvily? How to use it properly?

I am trying to find all files named doc.py in one of my virtualevns (called data_science), which are all in hidden directory .virtualenvs under /Users/adni and so I go: mdfind -onlyin data_science ...
2
votes
1answer
229 views

Redirect stdout/stderr of a background job from console to a log file?

I just run a job (assume foo.sh). ./foo.sh [Press Ctrl-Z to stop] bg # enter background And it generate output to stdout and stderr. Is there any method to redirect to stdout and stderr to other ...
4
votes
1answer
29 views

ZSH autolearn completition plugin

Is there something like "autolearn" command/plugin for zsh? By this I mean when I type command option option1 ... and zsh don't know about options for this particular command I want zsh to remember ...
0
votes
2answers
32 views

the same tr translate failed on some of machine

I use the following code and failed. $ echo $TERM xtermc $ v=/bin:/usr/bin:/usr/local/bin ; echo $v | tr ':' '\n' /binn/usr/binn/usr/local/bin It seems skip my '/'. I don't know how to solve this. ...
0
votes
1answer
19 views

Disable automatic capitalisation of git checkout BRANCH_NAME in ZSH/oh-my-zsh

I'm using zsh 5.0.2 with oh-my-zsh plugin and whenever I do tab completion on git checkout f it comes out as: git checkout Feature\ For some reason it's automatically searching uppercase branch ...