Skip to main content

Questions tagged [zsh]

Zsh is a shell with many advanced command-line and scripting features.

7 votes
3 answers
636 views

I am trying to unzip a set of files (3 files). These files contain a lot of random files, duplicate files etc. To do this, I am first unziping the list of the names of files into a text file, then ...
CarriMegrabyan's user avatar
0 votes
0 answers
38 views

del-prompt-accept-line() { OLD_PROMPT="$PROMPT" PROMPT="> " zle reset-prompt PROMPT="$OLD_PROMPT" zle accept-line } zle -N del-prompt-accept-line ...
Nils's user avatar
  • 265
0 votes
0 answers
16 views

I'd like to use my current zsh autocompletion setup but filter out some of the results. I've set up an autocompletion file and put it in my fpath so that it gets autoloaded. But there's one critical ...
sasquires's user avatar
  • 135
9 votes
1 answer
193 views

Why does zsh delete a trailing comma when I type a closing brace? For example, trying to compare two files foo.txt.bak and foo.txt: diff foo.txt{.bak,} When I type that closing brace, the comma is ...
mgiuffrida's user avatar
5 votes
1 answer
349 views

Why these commands lead to opposite comparison results between -ne and !=? Seems != works but -ne does not? I thought they are the same while comparing strings. % set -o | grep pipe pipefail ...
WesternGun's user avatar
2 votes
1 answer
116 views

% zmv -n 'Folder One/Image \((*)\).png' folder_two/img_${(l:2::0:)1}.png zmv: error(s) in substitution: Folder One/Image (10).png and Folder One/Image (1).png both map to folder_two/img_00.png Folder ...
Nils's user avatar
  • 265
0 votes
0 answers
53 views

I am trying to implement a shell(zsh) based Pomodoro clock and I encountered a problem: sending -STOP signal to background sleep process does not stop it. WesternGun@MyMacBook-Pro:~ [12:13:49] 0 % ...
WesternGun's user avatar
1 vote
1 answer
81 views

If I have the following Zsh assoc array: declare -Ar assoc_arr=( [a]="x" [b]="y" [c]="z with space" ) I’m trying to come up with a param expansion to output the ...
Dan Li's user avatar
  • 235
0 votes
0 answers
66 views

In ZSH, how do you set the value of an associative array parameter to an array? e.g., % declare -A a=() % a[first]=(1 2) zsh: a: attempt to set slice of associative array And when I try and append ...
Emily Lockhart's user avatar
7 votes
1 answer
281 views

There seems to be limited/inconsistent support for unusual but legal characters in zsh (and sh, bash) shell variable names on mac. Is there any way to fix this for full or better support? Perhaps this ...
owengall's user avatar
  • 173
1 vote
1 answer
71 views

Please look at this pattern replacement in parameter expansion: % zsh -c 'echo ${0/%.jpg/.jpeg}' toto.jpg toto.jpeg Replacement does not occur here: % zsh -c 'echo ${0/%.jpg/.jpeg}' toto.JPG toto.JPG ...
Pierre ALBARÈDE's user avatar
0 votes
2 answers
88 views

When timing a command with time, there is inevitably some overhead (from the CPU, operating system, shell and so on). Running the following code, from a tty text mode virtual console with all ...
Markus Klyver's user avatar
2 votes
1 answer
201 views

I have the following (excerpt from a) zsh shell script (the FOLDER environment variable is exported earlier in the code): # Create temporary directory export TMPDIR=$(mktemp -d) # Set TIMEFMT to ...
Markus Klyver's user avatar
1 vote
1 answer
94 views

Since Java 10 as I recall, we can run Java source files directly from the command line: bash $ java Math.java The JVM compiles and executes the file automatically. However, in zsh, tab autocompletion ...
menteith's user avatar
  • 292
0 votes
1 answer
89 views

I use nix and home manager, zsh and tmux. My problem is that in tmux splits the nix command does not exist. I tried setting default shell in tmux to /bin/zsh -l sourcing files etc, I notice the PATH ...
Darek's user avatar
  • 541

15 30 50 per page
1
2 3 4 5
210