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

learn more… | top users | synonyms

0
votes
2answers
224 views

Command Line: z is installed but can't find the command

I recently installed iTerm2 and ZSH (with oh-my-zsh) after some months of very light usage of the stock Terminal on Mac OS. I heard of a tool called "z" and installed it via brew with brew install ...
1
vote
0answers
39 views

Why does `zsh` insert a `~` when I press the delete key?

I have set my zsh to use vim style for editing command lines. However, when I use the Delete key, it inserts a ~ character. Have I misconfigured my zsh? How do I turn this off? Do I need to go ...
1
vote
0answers
33 views

How to properly match newline with zsh regex?

for my prompt i am trying to parse the current git branch out of the resulting text of the git status command. For example, it returns: On branch master nothing to commit, working directory clean ...
1
vote
1answer
96 views

Keep color in less after make and pipe

I would like to keep color in less command after using "make 2>&1" to compile some program. There are similar topics with "grep" and "ls" commands but solutions do not work with this command. For ...
2
votes
1answer
84 views

Why doesn't zsh autoload work in a script?

I am trying to get to grips with autoloading functions in zsh. I have added the folder in which I'm storing my functions (~/.zfuncs) to my fpath, and I've added a test function # ~/.zfuncs/myfunction ...
1
vote
0answers
54 views

Dynamic Zsh auto-completions

I'm trying to write completion functions for some custom functions I wrote, but seem to be really struggling with even the most basic ones. An example function is: function eb_instances() { if ...
1
vote
0answers
17 views

Menu with ZSH (not completion)

I'm producing a whole lot of ZSH functions, and would like to provide an interactive menu to allow me to navigate to the various functions, gather required data and then invoke the functions. I've ...
0
votes
0answers
220 views

Zsh gives “permission denied” error on iTerm2

I configured my zsh by downloading the latest using homebrew on Yosemite. So the default shell is /usr/local/bin/zsh on iTerm2 application. However, when I try the command $ .. $ zsh: ...
2
votes
1answer
45 views

zsh shell fg command coming from bash?

Is there a way to edit the fg command so that it behaves like the one bash uses? Instead of having: fg %<job number> in zsh, can I have: fg <job number> as in bash?
1
vote
1answer
15 views

zsh, on linux: typing lp cds me to /var/spool/lpd. Why?

I tried to find if lp is a command: % type lp lp not found It's also not an alias. I do use an oh-my-zsh config. I searched the directory for hints, also found nothing. I wonder if anyone knows ...
0
votes
2answers
32 views

Reference cells in column of .csv from command line

I have a column B in my.csv in which each cell references the filename of a document in a directory source_directory/. I'd like to grab each of those names so I can use them as args for other shell ...
0
votes
1answer
13 views

Zsh: prepend $(<list.txt) args with a directory

I'm using cp $(<list.txt) new_folder to copy a list of files (filenames in list.txt) to a new folder. As is the files must be in the same folder as list.txt. Is there an easy way to make this work ...
0
votes
3answers
58 views

Sudo feature in zsh

I am using zsh on my Linux boxe as well as my MAC. However, in both env, I have a "problem". When I type " !! ", it does not work in zsh, but does in bash. More, it's really useful with "sudo !!". ...
4
votes
1answer
87 views

Create expandable commands

I use ZSH via Oh-my-zsh, and one neat feature I see is that the shell expands my commands when they are in backticks. For example, `pwd` + tab, replaces `pwd` with my current path: I am wondering ...
1
vote
1answer
113 views

Zsh / git: Tab autocomplete not working if “HEAD^” is next to last word on input row

Problem I have the following git reset HEAD^ half_entered_file_n<Tab> At this point I would like the half_entered_file_name.txt to be Tab-completed. My own investigation I can get Tab ...
1
vote
1answer
25 views

zsh, modifying an old command in history

Sometimes I have to repeat a command I typed ages ago, so I do something like: $ history | grep ssh 195 ssh josetocino@eq1 209 cd .ssh 211 cat id_rsa.pub | ssh josetocino@eq1 'cat >> ...
1
vote
1answer
29 views

how to correct two host names in known_hosts

I'm trying to use ssh-keygen -R to remove a host line. However, each time I attempt this I get a zsh: no matches found:. When I look at the known_hosts file the line I want to modify starts like this ...
2
votes
1answer
143 views

Is administrator account necessary in order to use shells such as zsh and fish?

I have a weird situation. I’m using Mac OS X 10.11 (El Capitan) and iTerm2. Zsh is listed by default in /etc/shells as /bin/zsh, and this allows me to use Zsh without any issues on my standard ...
-1
votes
1answer
26 views

Weird perl + zsh-behaviour when running “for (1 .. 80000000) { print qq#$_\n# }”

I tried to run a script in a newly opened zsh-session which was $ perl -e "for (1 .. 80000000) { print qq#$_\n# }" So, I needed some time to type it in, then it took some time and did nothing and ...
0
votes
1answer
135 views

UTF-8 not displaying correctly in Cygwin+zsh using ConEmu

I have installed the following things to use for development: ConEmu 15083c Recent Cygwin version Cygwin zsh-5.0.8 Oh-My-Zsh This theme Now, when choosing a theme I realized that the display of ...
0
votes
1answer
40 views

ZSH DELETE keybinding

I am using zsh and i m having a hard time with the keybindings for the DELETEbutton. So for example i would like to use a command from my .zsh_history. To do so i hit the up button. If i now want ...
2
votes
0answers
25 views

WHy is my oh-my-zsh looking so bad after a fresh install

So I use a fresh oh-my-zsh installation using "robbyrussell" default theme. But the terminal looks like this
0
votes
0answers
28 views

Can't call zsh functions from the script

I am not being able to call ZSH functions in my .zsh scripts. Have the following configuration: ~/.zshenv: export ZDOTDIR=~/.zsh if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s ...
0
votes
1answer
51 views

Git autocomplete on oh-my-zsh not finding branch names

Somehow last week my git autocompletion on Oh-my-zsh, on my iterm app on mac started behaving strangely. if I type git checkout and then I used to get autocompletion on the branch names, so I was ...
2
votes
2answers
101 views

How can I disable globbing for URL arguments in Zsh? [duplicate]

I just wanted to download a YouTube video using youtube-dl, however, zsh interprets the questionmark ? (which separates the query part of the URL) as a globbing wildcard operator (which matches any ...
6
votes
4answers
2k views

OS X 10.11 (El Capitan) Making Zsh Very Slow

I just freshly installed El Capitan on my MacBook Pro. I had trouble earlier with the my terminal being too slow while typing in simple commands. I thought it might have been that I need to format my ...
2
votes
1answer
71 views

zsh doesn't log not found commands to history [duplicate]

There's a way to setup zsh to not save commands not found to history ? For example, if by mistake I type: got push instead of git push then got push entry is added to history file, how to stop ...
2
votes
1answer
63 views

How to insert special characters with zsh line editor?

In vim we can type Ctrl+v then Number in insert mode to insert special characters. This is mostly used to insert control characters. But any characters can be inserted if we know the ASCII number. ...
7
votes
3answers
1k views

Why are not all files compressed and how to improve the solution

I have a folder with about 20K files. The files are named according to the pattern xy_{\d1,5}_{\d4}\.abc, e.g xy_12345_1234.abc. I wanted to compress the first 10K of them using this command: ls | ...
0
votes
1answer
42 views

Transferred from -oh-my-zsh to prezto but nothing seems to be working?

Just transferred from oh-my zsh to prezto but I can't seem to get anything working unfortunately. eg presto commands like: prompt -l (to see themes don't seem to work). (I have my .Z----- files setup ...
1
vote
0answers
44 views

zsh: autocomplete relative paths

I'm extensively using binstubs in my projects. So each project has a bin/ folder with commands. I've added ./bin to my $PATH, so I can call them easily (I always call the commands from the root of the ...
1
vote
1answer
367 views

Multiline RPROMPT in zsh

I know you can define multiline prompts in zsh: PROMPT=' test → ' But I was wondering, why can't you define multiline right prompts? I tried: RPROMPT=' test still test ' but nothing shows up. Is ...
3
votes
0answers
283 views

How can I have an unlimited history in zsh?

I want an unlimited history file in zsh. As far as I know I can only set HISTSIZE and SAVEHIST to a big number.
1
vote
0answers
87 views

OSX zsh not showing characters right (with UTF8)

After setting the locale to 'en_US.utf8', all the characters(except a-z A-Z) are not showing correctly. For example, space will show up as '<0020>' The locale is: $ locale LANG="en_US.UTF-8" ...
0
votes
1answer
597 views

How to set symlink short cut to Sublime Text 3 in terminal? [duplicate]

I'm using the ZSH bash https://github.com/robbyrussell/oh-my-zsh I found and followed the directions here to symlink Sublime Text 3 to subl https://www.sublimetext.com/docs/3/osx_command_line.html ...
1
vote
0answers
49 views

unxutils zsh on wide terminal

I'm usually working on linux, but am now forced to use windows (xp). In search of a usable shell, I installed unxutils. They provide a zsh and when used with the default setup it works nicely. But ...
0
votes
0answers
64 views

how to keep the window's name fixed in tmux after I rename it with zsh

I use zsh with oh-my-zsh and tmux 1.8.1 I want the windows' name changed with the changing of my dir,but fixed after I first rename it. It is fine when I use shell, but the windows' name will still ...
1
vote
2answers
52 views

“read” works as expected in ZSH but behaves differently when using any other shell

I’ve written a short while-do cycle but I found it working strange with different shells. That's it: find "`pwd`" -type d | while read -r D; do ls ${D}; done When I start it using zsh, all goes ...
1
vote
0answers
49 views

How can I import my Ubuntu terminal's color scheme for a different computers?

I did a reinstall on my computer presently, and I want to restore my previous terminal settings. While exporting my settings, I ran the command gconftool-2 --dump '/apps/gnome-terminal' > ...
0
votes
1answer
187 views

How to configure custom keyboard shortcuts in ElementaryOS Freya?

How do you actually set what the keys do??? http://blog.elementary.io/post/119612714681/custom-keyboard-shortcuts-are-here When I go to this screen I: press the + button enter the name of the ...
1
vote
0answers
33 views

zsh: Autocomplete filenames if no other completion available

Many commands expect a filename as one of their arguments. When hitting tab in bash it autocompletes the filenames of the current directory by default. This is not the case in zsh (oh-my-zsh). How can ...
0
votes
2answers
101 views

FFmpeg : mp4 and multiple srt into mkv

I have a couple of srt subtitle tracks for an mp4 video. How do I make them into mkv using ffmpeg/avconv? I would like to use space efficiently. Performing conversion on Darwin v13. I will be ...
18
votes
1answer
4k views

How to fix and recover a “corrupt history file” in zsh?

After a reboot, I started seeing a message when loading the shell: zsh: corrupt history file /home/myusername/.zsh_history How can I recover from this situation and potentially recover some of the ...
2
votes
1answer
119 views

Zsh shows debug information on startup

My zsh shell is showing some weird behaviour lately. Every time i start a new session these debug information are shown before my prompt: LC_CTYPE=en_GB.utf8 LESS=-R LOGNAME=username ...
0
votes
0answers
65 views

In which zsh configuration file should environment variables like PATH be set/exported

The answer to this question for bash in Environment variables in bash_profile or bashrc? is basically that it should be done in a file that is only executed for login shells so that overrides of ...
1
vote
2answers
417 views

Using zsh and mcports. Command not found

I installed macports but I use zsh. What should I modify in the .zshrc file to get it to look for macports? I think macports is located in /opt/local/bin/port
1
vote
1answer
87 views

ls colors disappear after running zsh

I installed the latest version of zsh on my osx using brew and then went ahead and installed oh-my-zsh. Everything is fine and dandy, but where did my ls colors go? If I run a bash -l inside of that ...
0
votes
1answer
315 views

How do I fix vim colors in OS X Yosemite?

I've been trying to fix this for weeks, to no avail, and it's been really frustrating. Here is the issue: Fed up with the wrong colors and general plugin mess, I decided to wipe my .vim and ...
1
vote
1answer
26 views

“Wait for everything but particular usbmodem” zsh regular expression

I am writing firmware for different devices that communicate with each other and both of them are connected to my mac by USB. I am using zsh. First one is always on /dev/tty.usbmodem1 and for some ...
1
vote
1answer
63 views

history-search-backward ignores search text after first space character?

I use a lot of git commands and since they are mostly 2-word command names, matching doesn't find the closest match. For example: # type in some commands git checkout - git status mvn test # try to ...