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

learn more… | top users | synonyms

1
vote
2answers
44 views

How to run “time” on a function in zsh

This works: time ls -l This does not work f() { ls -l } time f No time output is printed in the second case. Why?
1
vote
1answer
196 views

Disabling “oh-my-zsh” SVN completion

I am using Zsh version: 4.3.11 with the oh-my-zsh framework. When coupled with "oh-my-zsh", Zsh will attempt to autocomplete SVN (and Git for that matter) commands when the TAB key is pressed during ...
1
vote
4answers
72 views

Remove all folders that does not contain a specific name in UNIX

I'm trying to figure out my old skill in *nix. What I'm trying to achieve is to remove every folders that does not contain a specific word. This is the listing ➜ myfolder: pwd /user/myfolder ➜ ...
1
vote
1answer
126 views

When is .zprofile file read?

I am using .zprofile to set up some stuff, and I assume it is evaluated everytime I log in to given user. Am I correct?
1
vote
0answers
270 views

tmux in zsh with vi mode, toggle cursor shape between normal and insert mode

(note: I wrote this question on stackoverflow, but got flagged as offtopic, so I'm re-writing it here) Here's what I want: Consistent behavior (as much as possible) between Vim, MacVim, zsh with ...
1
vote
1answer
66 views

Pre-compiled command line input in zsh

I recently set up a ubuntu 12.04 64 bit machine. I use tmux with many open windows, all of them use zsh as shell, some of them through a chroot environment that uses the same home folder of the normal ...
2
votes
1answer
126 views

Common keyboard shortcuts for zsh zle and bash readline

I use zsh as my shell, but there are a lot of commandline programs which use readline. I also like to configure different keyboard shortcuts (e.g. ctrl backspace and ctrl delete). Is there a way to ...
3
votes
1answer
64 views

Why does `${$(pwd)}` output current working directory in zsh?

In zsh, ${$(pwd)} output the current directory. However, if I run echo ${/path/to/somewhere}, it just shows an empty line. Why does this happen? Thanks!
3
votes
1answer
711 views

Any way to get list of functions defined in zsh (like alias command for aliases)

I can type alias and get a list of defined aliases in zsh How can I get a list of function names defined in zsh? When I type "functions", my shell window hangs after displaying lots of functions, ...
0
votes
1answer
58 views

How to zsh pipe to grep to match remote branches beginning with 'orgin/'

I tried this: git branch -r --merged | grep '^origin/' But I get nothing... When I remove the caret: ✗ git branch -r --merged | grep 'origin/' origin/HEAD -> origin/master ...
2
votes
4answers
353 views

Strategy to maintain dotfiles for different OSs (i.e. osx and ubuntu)

I use a Git repository to maintain my dotfiles (vimrc, zshrc, tmux.conf, etc.). As I've two different operating systems (OSX at home and Ubuntu at work) I've dedicated a branch for each system. This ...
0
votes
1answer
79 views

Steam locomotive in zsh

In zsh, when I type ls, it lists the files in the directory, as I would expect it to. However, when I type sl zsh does not ASK whether I want a steam locomotive to roll across my screen. It simply ...
2
votes
2answers
7k 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
213 views

How to batch rename files using bash

I know there are lots of such questions, but I couldn't find one (or a combination of several), which describes the things I want to do. I think I need to use regular expressions, but I am not very ...
0
votes
2answers
506 views

Prevent zsh from trying to expand everything

Recently switched from bash, I noticed that zsh will try to expand every command or argument that looks like it has wildcards in it. So the following lines won't work any more: git diff master{,^^} ...
2
votes
1answer
318 views

make a certain software version the default in ubuntu

I currently have 2 version of php installed on ubuntu 12.04. one for php 5.3 installed using apt-get while the other one is installed with xampp with php 5.5 When i execute these commands: > ...
1
vote
2answers
66 views

Alias for directory using a symbol

I'm looking to set up an alias for my work directory, which can change as I change context, and I was trying to find something that was short enough to stand in as a replacement for ~. I'd be tickled ...
0
votes
1answer
76 views

zshell globing works for ls, but not scp

Note: This problem is with zshell, it works with bash. I have some images: $ ls *.jpg a.jpg b.jpg But when I try to copy them with scp, it says there are none: $ scp *.jpg host: *.jpg: No such ...
1
vote
3answers
111 views

Enter a string containing “!!” on a shell without it being interpretted

I'm trying to send a string that contains "!!" in it. However, every time I execute it on zsh, zsh replaces !! with the last command entered. How can I get zsh to not interpret "!!"? I have also ...
1
vote
1answer
258 views

Run a local command after closing an SSH connection?

I've set up my zsh to update the XTerm title whenever I change directories. It's neat! Unfortunately I have one common problem, which is this: % cd foo; # title changes to "host1:~/foo" % ssh ...
1
vote
1answer
203 views

Zsh crashes on specific tab completion (workon)

This is an annoying bug related to ZSH and python virtualenvwrapper. I couldn't find any clue on this anywhere on the web, so I am going to make a new post in SU! Symptoms Use ZSH, and python ...
2
votes
1answer
255 views

Exclude directories in ZSH glob

With zsh, you can use **/* as a short alternative to using find. Is there any way to restrict that to regular files, that is an equivalent to the -type f option?
0
votes
1answer
32 views

why is the terminal or “ZSH” protesting on this command

to be clear, if I run this without the alias everything is ok but with the alias in my "zshrc" config alias hh="history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -r" ...
2
votes
1answer
174 views

Is there a way to print out execution time (wall time) in zsh when it exceeds certain configurable threshold?

@mpy 's comment was correct. So I'm rephrasing my question. I really like REPORTTIME feature in zsh, but it only reports time when user+system time is greater than $REPORTTIME according to zsh doc. Is ...
1
vote
0answers
25 views

crontab does not lauch [duplicate]

I am trying to launch a cron job every hour (an interactive system upgrade). The code that does the actual update ( a no-password sudo yum update) is in my .zshrc (I use zsh as my shell). To launch ...
6
votes
3answers
904 views

Removing the useless space at the end of the right prompt of zsh ($RPROMPT)

In zsh, there is always a space character at the right of my right prompt. I tried with a very simple .zshrc such as: PROMPT="#" RPROMPT="*" There is a always a space after the * on the right of ...
2
votes
1answer
85 views

What's the rule on using the word “git” as an alias?

I used to keep my git aliases in a file outside of my .gitconfig file, in the normal format of: alias gb="git branch --verbose" which worked great. But, after looking around at others' dotfiles, I ...
1
vote
1answer
46 views

zsh — ^W behavior with oh-my-zsh

I've recently started using ZHS with oh-my-zsh script pack. It does excellent job except of weird ^W shortcut behavior. For example if I have following command line and symbol ▮ denotes cursor ...
1
vote
1answer
417 views

How do I fix the serious lag with rake autocomplete in oh-my-zsh

I'm getting serious lag when doing auto complete for rake. I have a 2011 MBP with an SSD and I'm still getting something like 3 - 5 second lag when attempting to autocomplete. Thanks for your help! ...
5
votes
1answer
437 views

Zsh says “no matches found” when trying to download video with youtube-dl

I downloaded youtube-dl using pip on CrunchBang (a Debian Wheezy distro). When I run youtube-dl {video URL} I get zsh: no matches found: {video URL} I guess it has something to do with zsh, ...
2
votes
1answer
69 views

How can I complete directory entries that are under a subdirectory?

I have an function in my .zshrc called c that is defined like so c() { cd ~/Code/$1 } How can I teach ZSH to treat this c function just like I had done cd ~/Code from the command line so that it ...
1
vote
1answer
393 views

Split window programmatically with iTerm?

on my development workstation I often have to start the same commands every morning. zeus start, zeus server (booting rails via zeus), redis-server, and like 3 others. I know a lot of people would ...
1
vote
1answer
428 views

zsh initial working directory

When I start a new zsh session it always seems to set its working directory to the last-known working directory of any other zsh session running on my system. Is there a way to configure zsh to just ...
0
votes
1answer
47 views

Time command not behaving correctly

I am having a weird problem with the time command. When I try and run $ time rspec spec It should return Finished in 15.78 seconds 75 examples real 0m22.334s user 0m17.952s sys 0m2.643s ...
3
votes
1answer
1k views

Why is a percent sign appearing before each prompt on zsh in Windows?

I'm getting zsh set up in Windows and I'm getting a reverse (black on white (black terminal background)) percent symbol in the first character position in the line just above every prompt. Usually ...
3
votes
1answer
116 views

Setting the $SHELL environment variable

For some reason, when I run chsh -s /bin/zsh, my $SHELL environment variable isn't getting set. When I run: echo $SHELL It outputs: /bin/bash
3
votes
2answers
146 views

Is it possible to highlight the non-breakable space in zsh / terminal?

I’m looking for possibility to somehow highlight the non-breakable space (\xA0) in the shell output to distinguish it from the normal space during debug sessions. E. g., I would like to see the output ...
2
votes
1answer
77 views

Weird behaviour of zsh iteration over content of a variable

I have a weird behaiour with ZSH when iterating over the content of a variable. A demo is better than a long talk in this case, so here is my problem: (yoann@freya) test_bash » ls file1 file2 file3 ...
1
vote
1answer
295 views

awesome does not recognize PATH change

I use zsh as my login shell, lightdm as login manager and awesome as window manager. I changed the PATH Variable in my ~/.zshrc and it works on the terminal, but awesome itself does not recognize the ...
0
votes
0answers
91 views

Source ~/.zshrc needed after OSX terminal restart

I have some zsh custom autocomplete set up in OSX for a custom command I have. These autocomplete functions are defined in ~/.zshrc. If I restart the OSX Terminal, I see that the autocomplete does not ...
2
votes
1answer
471 views

Does zsh support hash table as a built-in data type?

If supported, which version of zsh should I use to take advantage of this feature? How to declare and use it in code?
2
votes
3answers
1k views

After switching back to bash can't access root

I'm new to Linux and using Debian 7. I was using bash, but tried out zsh by using chsh. Initially probably entered a bad shell name but eventually switched to zsh successfully. Now I switched back to ...
1
vote
1answer
826 views

Terminal starting with “no such file or directory:” message on OS X

After installing/uninstalling homebrew and other command line software such as zsh, I had an issue with my command line prompt, which let me to remove several configuration files such as .bashrc, ...
1
vote
3answers
3k views

How to change Terminator title terminal title, ZSH on Debian?

I don't know if I should ask it here or on unix.stackexchange.com, I found this question here. My question is similar, I want to change the title of a terminal, I'm using a Debian based distro, ...
1
vote
0answers
142 views

Emacs + Zsh unexpected linebreaks

I'm new to Emacs, and I'm trying to switch my workflow to using my terminal through Emacs. I'm a Zsh user, and I love my terminal. I've been fiddling around with ansi term for a while now, and got my ...
1
vote
1answer
78 views

Zsh not recognizing file changes with search path

I'm using ZShell with Oh-My-Zsh on OS X 10.8. Updates within my search path aren't immediately recognized. My search path: [~]$ echo $PATH ...
1
vote
2answers
177 views

How to copy all the files from a folder but the symlink

I'd like to copy everything recursively from a folder but the files symlinked from an other directory, how can I achieve that?
1
vote
2answers
340 views

Set Tab Title to your current working directory instead of the current job name in zsh iterms

I'm running iTerms on my Mac OS X with zsh. With my workflow I have to switch between tab a lot and sometime I have to spend too much time just to find which tab is the one I'm looking for because all ...
2
votes
3answers
3k views

Change the sudo su shell

Whenever I run sudo su from my normal zsh (which uses the oh-my-zsh framework), I'm forced to use the old Bourne shell (sh) by default (obviously; this is standard behaviour on most *nix-like ...
0
votes
1answer
110 views

Controlling the width of a directory listing in terminals

I'm on OS X with iTerm2 and OhMyZsh. When I do an ls command, somehow it decides how much space it needs between the output columns. Is there a way to control that and tell it how many spaces to show ...