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

learn more… | top users | synonyms

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
61 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
501 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
388 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
109 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
854 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
52 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
73 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
54 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
54 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' > gnome-...
0
votes
1answer
228 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
39 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
158 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 ...
24
votes
1answer
5k 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
148 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 LSCOLORS=...
0
votes
0answers
81 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
607 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
108 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
361 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
69 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 ...
2
votes
1answer
1k views

Add timestamp to oh-my-zsh robbyrussell theme

I want to add a timestamp to my command prompt in oh-my-zsh. This is the current theme prompt (robbyrussell): local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" PROMPT='${ret_status}%...
9
votes
3answers
3k views

How to change the default shell in Cygwin?

I am trying to change my default shell from bash to zsh in cygwin. The normal unix command chsh isn't available on cygwin The etc/passwd file it seems isn't used anymore in existing versions of ...
2
votes
0answers
50 views

Search terminal buffer in shell script

I have a shell script named merge that takes a parameter that is a revision number. I usually invoke it merge 12345. I would like to pass in zero parameters. The script should search my terminal ...
0
votes
1answer
244 views

Why does sh not find files in my path that do exist?

When I type this in sh it outputs : $ $PATH sh: 12: /bin:/usr/bin: not found But, I do have a /usr/bin folder, and it's fuuuuull of stuff. Same thing with zsh: ▶ $PATH zsh: no such file or ...
2
votes
1answer
80 views

Why does ZSH local variable assignment fail?

I was reading this question and answer: zsh - variable assignment isn't working. The post explains how to fix it, but not why. Why does the local variable assignment fail in that case ? There ...
0
votes
1answer
127 views

Add application (Sublime Text) to PATH in ZShell

My config: MacBook pro 2014 OSX Yosemite ZShell I'd like to be able to type: EdChigliak $: sublime "filename.txt" and have my file opened in Sublime Text. I suppose I need to add Sublime Text ...
1
vote
1answer
38 views

What is 'execute:' on the command line, and how to I avoid it?

So I am using iTerm 2 on mac OSX, running zsh in case any of this is relevant. I must have clicked something by accident, because this dialog appeared, and I can't seem to dismiss it: Everything ...
1
vote
1answer
52 views

How to prevent zsh from expanding history when space bar is pressed?

I would like to use the expansion mv 'foo bar' !#:1:s^\ ^-^ to produce the command mv 'foo bar' 'foo-bar'. However when I press the space bar, zsh assumes I've finished typing the expansion, leaving ...
1
vote
1answer
37 views

zsh regex failing, bug or user error?

This regex works (stripping out -search) [~%]for i in foo*-search-aae-status ; do echo $i(:s/-search//) ; done foo1-aae-status foo2-aae-status foo3-aae-status foo4-aae-status foo5-aae-status But ...
3
votes
1answer
34 views

zsh moving to parent directory with shift tab

How can you achieve in zsh that pressing shift+tab enters the parent directory AND updates/prints the new directory at the beginning of the cmd line? Current situation/behaviour: ~ % # ...
3
votes
0answers
156 views

Bug with resizing panes in tmux when using ZSH

I am using Tmux with ZSH and have a problem when trying to resize panels. I am currently using these bindings to resize panels as I work: unbind-key M-j ; bind-key -n M-j resize-pane -D 1 ...
2
votes
1answer
152 views

tmux - get pwd of another pane in a bash script?

Is there anyway to find out information about the current working directory of any pane from within a tmux session? I'd like to write a bash script that changes the directory of the current pane to ...
4
votes
2answers
72 views

zsh - preview parent directory names when 'cd ../../../'

Anyone knows of a way to make zsh show me a preview of the parent directory I would be in if I hit return right now? For instance, if I'm very deep down a directory tree, and I start typing .... (...
0
votes
0answers
58 views

Zsh compdef for apt-get install, or other 2 part commands

How can I use a compdef for zsh completion such that a custom written function uses a 2 part command for the completion? Example: my_function () { sudo apt-get install $@ } compdef my_function=&...
1
vote
1answer
268 views

.zshrc doesn't export variable for anaconda

I installed Anaconda Python on my Mac today and following line was added to .bash_profile by Anaconda. Since I am using zsh so I moved this line to .zshrc. However, it doesn't work properly even if I ...
3
votes
1answer
1k views

How to save user made zsh shell functions and aliases

Shell beginner here! I'd like to create aliases and functions in zsh shell to speed up my workflow. For example: tw() { open -a //Applications/Textwrangler.app "$*"; } The function itself works, ...
1
vote
2answers
100 views

Should I ignore .bash_rc, .bash_profile etc if I'm using Zsh?

Zsh configs go into the ~/.zshrc file. That’s where I’ve been putting my aliases, etc… But I want to know if I should be ignoring .bash_profile and those other files, and putting everything into the ....
1
vote
2answers
276 views

How to make Zsh not store failed command

Problem I'm using oh-my-zsh and Antigen to manage my Zsh. Sometimes I will accidentally enter a wrong/failed command into Zsh and it is very annoying when the zsh-autosuggestions plugin throws up ...
1
vote
1answer
58 views

Some characters in zsh don't show until the key is released

When inputting specific characters in zsh shell (in my case e and ;) they don't show up immediately after pressing the key. Instead they only show up a short time after releasing the key. When these ...
1
vote
1answer
25 views

How can echo the previous command I ran to a file?

I tried running echo '$(!!:p)' > /tmp/tmptxt.txt, however I just get $(!!:p). The previous command may have unescaped characters so I i need to escape it.
1
vote
1answer
198 views

How to make zsh always show environment variable name instead of the path?

I have an environment variable set to my projects folder like this: PROJ=$HOME/projects When I want to open a project folder i just type PROJ/project_name and the shell opens the directory and my ...
0
votes
0answers
33 views

Readline stops working randomly

For some reason every 1-3 hours (depending on work load) my shell read command stops accepting input and hitting return renders the ^M character. Something like: Continue? After answering: ...
2
votes
2answers
85 views

Setting the variable $USERNAME has no effect

Setting the variable USERNAME has no effect. Accessing the variable always returns the current logged in user. james@localhost:~$ USERNAME=foo james@localhost:~$ echo $USERNAME james I could not ...
0
votes
1answer
206 views

How to create a command shortcut in BASH or ZSHRC shells?

I know how to create an alias or a PATH however those are both used to navigate folders. How would you create a shortcut to say quickly type the following commands every time? alog = tail -f /var/...
3
votes
2answers
272 views

How do I signify repetition in a ZMV regex?

I'm trying to manually pull the digests off of Rails assets (don't ask). I was directed to ZMV for easy regex-based find/replace. But the normal {32} syntax for specifying an amount of repetition does ...
1
vote
1answer
70 views

Get word at cursor in zsh function

I'm trying to set up some fancy zle completion that requires passing the word at point to a subprocess. Zsh obviously knows about the current word/token/directory, and I can see how to bind things ...
1
vote
2answers
118 views

ZSH PS1 adding spacing when tabbing

I'm having an issue with zsh/oh-my-zsh with my custom PS1 prompt (that I brought across from bash). When I use the built-in zsh/oh-my-zsh prompt and tab for auto-completion, this works as expected. ...
3
votes
2answers
422 views

ZSH+gnome-terminal and VI input mode: Show ibeam or block cursor

Different methods exist to show if you're in insert or normal when using VI key binding in ZSH. Gnome-terminal also allows you to change the caret from block █ to ibeam | with a call to gconftool-2. ...
3
votes
2answers
966 views

Set urxvt shell without chsh?

I want to use bash as my default shell (so that it's simpler in tty) but I want to use zsh when I'm in X using urxvt. Is there a way to do this?