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

learn more… | top users | synonyms

0
votes
0answers
10 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
33 views
+50

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 ...
0
votes
1answer
34 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 ...
0
votes
1answer
17 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
10 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
22 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
17 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 ...
1
vote
1answer
19 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 ...
1
vote
1answer
48 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
37 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
47 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
32 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
27 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
20 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
37 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
23 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
27 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
12 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 ...
0
votes
2answers
26 views

Zsh: how to auto complete after a command?

everyone. It's a little difficult to explain what I want to do. I want to create a script 'example', which can input long commands for you after you run it with short parameters. For example, $ ...
1
vote
1answer
16 views

Is there a syntax in ZSH for creating multiple aliases at once?

I.e., if I'd like to alias both proxychains & prch to proxychains4, is there something equivalent to this?: alias prch='proxychains'='proxychains4'
1
vote
2answers
11 views

ZSH browse content of zip file

Is there any way or plugin for zsh where I can browse content of zip files in place instead of unzipping zip file and than making zip again? I want to achieve same behavior as in Midnight Commander ...
0
votes
0answers
15 views

ZSH and Passwordless access with SSH in a shared home environment

I have a small cluster with some nodes which share their home folder through NFS. I allow passwordless SSH access to the users with this script: if [[ -e $homeDirs/$username/.ssh/id_rsa.pub ]]; then ...
3
votes
1answer
14 views

zsh warning before executing file

I frequently find myself accidentally running python files as shell scripts, e.g. $ ./test.py This has potential to cause lots of damage if there was no shebang line at the start of the file, so I ...
1
vote
2answers
28 views

In ZSH line editor, how to insert a new line?

Say I am editing a single line, with my cursor at the indicated position: $ abc ꕯ def ghi I would now like to split into two lines and continue editing (like hitting ENTER would do in a text ...
2
votes
2answers
61 views

env -i zsh | How is this magic possible?

I'm currently working, for school, on a home-made shell, therefore I'm kind of curious nowadays about how shell vars are set. Yes, this can be really exciting ! Anyway, we obviously have to deal with ...
2
votes
1answer
12 views

How to disable the confirmation of history expansions like `!!`

Zsh takes real good care of me, and at times it can get a bit too much. One of the times where I'd rather have it stay out of my business is when it "wants to make sure I want to execute the given ...
0
votes
1answer
45 views

zsh (or maybe oh-my-zsh) history gets confused with multi-line commands

if I use the up arrow in a zsh session, as you'd expect I get previous commands, from newest to oldest. Now (whether it's zsh or oh-my-zsh doing this I don't know), but if I type the start of a line ...
4
votes
1answer
114 views

Emacs key for Home & End

I'm running Emacs in urxvt with zsh as shell: ~ % echo $TERM && echo $SHELL rxvt-256color /bin/zsh ~ % My current problem is that I can't get Home key & End key working properly in ...
2
votes
1answer
45 views

Binding caps lock to escape in z-shell

I want to rebind the Caps Lock to escape in z-shell to make better use of the vi-mode in the z-shell line editor. I don't want to rebind it for the entire system. Is this possible? (if that matters, ...
0
votes
1answer
36 views

ZSH: Where to place environment variable so that launched application can pick it up?

I need an environment variable KEY="value" made available to a GUI application before starting it. The launcher file (the one that places the icon on the desktop and sidebar in Ubuntu) has a value of ...
0
votes
1answer
15 views

zsh how to backspace through quotes

How can I backspace and move through quotes in zsh? Pressing left or backspace does nothing at the start of the quote after I hit enter after typing ': $ echo ' quote> The ...
2
votes
2answers
31 views

Locating the source of a function in zsh

I have this annoying issue in my zsh shell where a function is being declared somewhere and that function is named "cp" so it's overriding the normal cp behavior. I'm trying to locate the function ...
1
vote
1answer
73 views

Why does my zsh prompt wander upwards when window is too narrow?

I have a weird behaviour that seems to be a combination of zsh and maybe urxvt (?) My setup is this: I start urxvt -e 'tmux' to get myself a terminal which launches zsh as the default shell. I then ...
0
votes
0answers
25 views

Zsh prompt produces an error

I have the default prompt for oh-my-zsh, which is great when I have a git repo, but if there is no git repo its actually failing instead of putting nothing. I trapped an ascii image to err just for ...
1
vote
1answer
22 views

Nested substitution in ZSH

I use zsh. Say, for instance, that I want to remove the current directory from cdpath. That means that I need to remove an element based on content, which fits the ${name:#to_be_removed} pattern ...
0
votes
1answer
101 views

ConEmu (with bash/zsh etc. shell) - can't use key bindings using “Meta” (Alt) key

I have key bindings created with zsh such as: bindkey -s "^[l" 'ls -lrt --color=always\n' that I want to execute in ConEmu by holding "Alt" and pressling "l". It just prints a rectangle character ...
1
vote
1answer
54 views

rxvt-unicode (urxvt) v9.19 is not reporting users that are using ttys

I have some problems with urxvt v9.19, I'm not able to see myself reported in the who command. My setup is: Archlinux: Linux arch 3.12.7-1-ARCH #1 SMP PREEMPT Fri Jan 10 08:50:35 CET 2014 x86_64 ...
0
votes
1answer
13 views

Forwarding shell to servers without installing it

is there any way how to forward a shell to a server without installing it on that box? This is what I need to do: I work for company where we admin X boxes and I will probably not be allowed to ...
0
votes
0answers
58 views

Terminator and Zsh: ctrl+D not closing session

I've been a Terminator and zsh user for a while with consistent profiles across several machines. However, on a freshly installed Linux Mint machine, for some reason Ctrl+D (EOT) isn't closing the ...
0
votes
2answers
64 views

Zsh not recognizing ls colors

I just was introduced to Zsh and so far I am really liking the customizability. I use the following line to set up colors in .zshrc: zstyle ':completion:*' list-colors '' This gives me these ...
3
votes
1answer
120 views

How do I negate a ZSH regular expression test?

How do I negate the ZSH regex operator? I'd like to do something like: if [[ $host !~ '^myhost[0-9]+$' ]] then # Do stuff # ... fi ...or: if [[ !($host =~ '^myhost[0-9]+$') ]] then # ...
0
votes
1answer
39 views

zsh function cannot be used in tmux

I wrote up a special function to wrap a command, in ZSH, so it doesn't output any warnings and runs the process in my background. This command works great without tmux, but when I try to use it in a ...
1
vote
2answers
25 views

How to delete one directory level in a command argument (up to a slash) on ZSH command line?

I just switched from bash to zsh. One thing that is different and a bit annoying from me that Alt-Backspace removes the whole argument instead of just one word. I'm used to using it to remove one ...
3
votes
1answer
33 views

bash's command number ( \# ) equivalent in zsh

I'm looking for a character to put in my zsh's $PROMPT that would be equivalent to bash's \# (the command number of this command, according to this site). So far I've found only %h but this is not ...
0
votes
1answer
16 views

automatically launch/open a file when it changes

OS: OS X Lion Shell: zsh I'd like to automatically launch/open a file when it changes. Background: i'm working on a windows vm, generating pdfs. Syncing via dropbox and when a file changes on ...
0
votes
0answers
35 views

Why commands work at top of file, but not at the end

This is .tmux.conf file & as you can see it has a shell selection command at top. But it doesn't work if I put this line at the bottom. when I open tmux, it doesn't show any error or anything, but ...
0
votes
1answer
83 views

Tracing an error message when starting Tmux or Vim

Recently when I start Tmux on my Mac (with Powerline) in iTerm, I get an error git: Permission denied. I also get the error over and over again as I type in Vim (also using Powerline). As you can ...
1
vote
1answer
105 views

ZSH: how to ZLE widgets directly?

The documentation says in section 18.4 Widgets, that a "widget’s job is simply to perform some small action". But I cannot find a general description how to invoke these actions, i.e. how to call a ...
1
vote
0answers
79 views

Unintended autocomplete or alias in Terminal

There is a "strange" autocomplete function in my macbook. If I try to type "ps -aux" in terminal (iTerm or TotalTerminal) with the hit of "s" in ps, automatically this happens: "ps -p $$ # Tells the ...
3
votes
1answer
74 views

Can I use the output from a ZSH custom function in Tmux's status bar?

I defined a function in ~/.zshrc: foo() { print "FOO" } I'd like to output it in my Tmux status bar. I added this to ~/.tmux.conf: set -g status-right "foo: #(foo)" But I only see the static ...