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

learn more… | top users | synonyms

0
votes
1answer
9 views

Remove all extensions in zsh

Say I have a directory with many files with the .bak extension, and want to remove this from each. What's the simplest way to do that? I mean a command that would do what one might exspect from mv ...
0
votes
0answers
10 views

Is there a zsh add-on or an iTerm addon that allows arbitrary string autocompletions?

I often find myself staring at a string that was printed in my terminal, I need to use it in a command, but don't want to move the mouse to copy/paste it. I'm wondering if zsh or iTerm support ...
0
votes
1answer
19 views

Null key mappings in console vim on OS X

Running in zsh on Mac OS X's Terminal.app. The following 2 keybindings do work in MacVim, but not console vim (7.4) inoremap <c-space> <c-x><c-o> inoremap <c-@> ...
0
votes
1answer
14 views

Import previous commands to edited command

I'm playing with zsh to change image modification time according to the 'Date/Time Original' exif attribute. For this I one command I do: PDATE=$(exiftool -p '$DateTimeOriginal' $PIC | sed 's/[: ...
0
votes
1answer
13 views

Adding Scala to the PATH in zsh

I've been at this for a while and I think I'm starting to go crazy I have downloaded Scala to ~/bin for easy access on my Elementary machine; but I seem to have some difficulty adding it to the PATH. ...
0
votes
1answer
28 views

No such file or directory .zshrc

Recently, I realized I haven't been able to run . .zshrc in my home directory. It gives me the error above. It's really strange and it's bugging me out since it's worked perfectly fine in the past. ...
0
votes
1answer
29 views

command substitution before ssh

I want to write the results from a job into a remote file on another host in my cluster. I know I can do this: echo 'My text' | ssh me@my.host "cat >> ~/my.output" which will append 'My text' ...
0
votes
0answers
12 views

Which library implements the NO_PROXY variable?

Which library implements and passes to the network stack the NO_PROXY variable? Considering that is being read from a shell (ZSH, bash) or other programs. Is it just a variable that other programs ...
1
vote
1answer
20 views

ZSH: change prompt just before command is run

I would like to have a two-line prompt in zsh, but collapse it to a very small one just after pressing ENTER, so that it doesn't show up in the terminal scroll history. After typing two commands, the ...
0
votes
1answer
17 views

Resuming a job with 'r' in ZSH

I run Vim in zsh. And I often need to check something else in the terminal. So I just quickly suspend the editor by pressing Ctrl+Z and then type fg to get back. Today, by chance, I noticed that the ...
0
votes
0answers
16 views

Proxy stack configuration for KDE and ZSH

I have the following stack: Ubuntu 14.04 ZSH KDE Firefox Chrome PyCharm/other GUI applications ssh/git/wget/curl/etc from terminal And I'm behind a proxy server, http:proxy.server.com. I set up ...
0
votes
1answer
31 views

zsh: command issued gets repeated in output

I'm having an issue identical to: Repeated command in output for zsh prompt. As in, the command I execute is being repeated on the next line, and then the output of the command follows. But ...
0
votes
1answer
29 views

Delete files if condition is met

I have the following directory tree: /Directories/ /Directories/somedir/somefile.mkv /Directories/somefile.rar I'm trying to find a way to delete the .rar file if the .mkv file exists and is larger ...
0
votes
1answer
25 views

Setting up an alias in zsh, storing additional information

I am trying to build a triplet of aliases in zsh. jc, g1, g2, jc arg1 arg2 would be the same as the command cp -r arg1 arg2 And g1 is the same as cd arg1 and g2 is the same as cd arg2 The ...
0
votes
0answers
24 views

Is it possible to use ZSH-style completion in IPython?

In IPython, if I trigger a completion in an ambiguous context, for example var = [press TAB] then I got a whole screen of completion candidates. I have to scroll up to find out what I did before. ...
3
votes
2answers
73 views

How can I scroll up one line in zsh?

I'm using iTerm2 w/ bash and I scroll up through the history buffer one line by typing Shift+Up. When I switch to my zsh shell, it just inputs 2A. How can I scroll up a single line in zsh w/ just my ...
0
votes
0answers
17 views

Specifying Path With Escapes in an Environment Variable

This is a shell escaping syntax, cmake, and perhaps Haskell issue (not sure where to fix it). Specifically, I am in Cygwin and trying to execute something like: CXX=/different/g++ ./build_all.sh ...
1
vote
1answer
42 views

ZSH in iTerm2: Why my prompt can only use 8 colors?

I am trying to set a color prompt in ZSH ($TERM=xterm-256color), but it can only get 8 colors out: Only the bright version of the colors. This is only the case for prompt, while the other applications ...
0
votes
1answer
31 views

tmux exits with [exited] on Ubuntu 14.04

The machine is a VPS that I SSH into. The problem started when I installed Prezto tmux -v also exits with [exited] sudo tmux doesn't work either I don't have a .tmux.conf I seem to have a ...
0
votes
0answers
47 views

Why oh-my-zsh is that slow?

I am quite familiar with bash, but I would like to give a try to zsh. Lot of people told me to try oh-my-zsh. After the installation I get a unreadable prompt and when I eventually find an ...
0
votes
0answers
48 views

Error Resolving User Permissions + Zsh Command Not Found

This is the list of user permissions after logging them to the terminal: ➜ ~ ls -ld / /usr /usr/bin /usr/bin/manpath drwxr-xr-x 33 root wheel 1190 Nov 14 08:49 / drwxr-xr-x@ 11 root wheel ...
1
vote
2answers
102 views

OS X El Capitan 10.11 Terminal 2.6 won't open new tabs with same working directory

I am using the default settings for Terminal, but when I create a new tab my working directory is always set to my home folder instead of the current working directory of the previous tab. Here's an ...
0
votes
1answer
83 views

shell environment setup for virtualenv/virtualenvwrapper

The question is about shell setup for virtualenvwrapper, an extension to virtualenv (python guide). Similar questions had been asked many times but with a lot with different answers: Environment ...
0
votes
0answers
14 views

zsh - List files as default completion

In bash I would TABTAB with any command and local files would be listed. With zsh, grep doesn't complete to the local files. I removed it's completion function with compdef -d grep and alternatively ...
1
vote
1answer
29 views

zsh completion functions without separate underscore file?

I'm trying to learn how to write completion functions and initially I want to avoid a proliferation of separate files for separate customizations (I already have enough and I don't want more). Is ...
0
votes
2answers
75 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
35 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
20 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
64 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
45 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
38 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 ...
0
votes
0answers
10 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
95 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
33 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
13 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
30 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
11 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
41 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
100 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
22 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
26 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
126 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
24 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
81 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
28 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 ...
1
vote
0answers
19 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
22 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
43 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
77 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 ...