Questions tagged [zsh]

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

Filter by
Sorted by
Tagged with
2 votes
0 answers
231 views

Bug with tmux status bar and terminal lines in zsh and MacOS

I have a bug in my tmux. The status bar randomly transform into two rows (see image below) or disappear completely. Also, some lines of the terminal command disappear. See image below where the last ...
ℂybernetician's user avatar
2 votes
1 answer
1k views

How do HISTSIZE and HISTFILESIZE affects zsh directory history

I'm using zsh per-directory-history plugin https://github.com/tymm/zsh-directory-history I'm not clear that whether the history is limited by HISTSIZE or HISTFILESIZE I do find some usage of HISTSIZE ...
Zang MingJie's user avatar
2 votes
0 answers
423 views

Want to figure out which process (pid) is deleting a file on Mac OS X

I have a weird issue where files are being deleted from my /tmp folder, sometimes in as little as 5 minutes from creation. Doesn't appear to be the standard clean-tmps part of the periodic scheduler ...
Matthew Curry's user avatar
2 votes
3 answers
591 views

zsh script not printing output of "jobs" command?

This examples works on my zsh terminal, but not in the context of my zsh script: sh -c 'sleep 15 && echo asdf' & x=$(jobs) echo $x Works as expected on commandline (outputs [1] + running ...
angie's user avatar
  • 21
2 votes
1 answer
3k views

zshell says command not found in MacOS

I'm using MacOS Monterey 12.4. When I open zsh I get immediately /etc/zshrc:7: command not found: locale /etc/zshrc_Apple_Terminal:104: command not found: mkdir I understand that my terminal ...
Alberto Carraro's user avatar
2 votes
0 answers
3k views

zsh starts up in ~0.4 seconds most of the time but sometimes takes ~3 seconds

Recently, I got around to speeding up my terminal start times (which were regularly taking an excess of 8 seconds) by profiling my .zshrc. Then, I removed stuff I didn't need; lazy-loaded things like ...
Matias's user avatar
  • 215
2 votes
0 answers
147 views

Use expansion globs {a..z..2} in zsh like in bash

Both in zsh and bash you can: > echo {1..10} 1 2 3 4 5 6 7 8 9 10 > echo {a..z} a b c d e f g h i j k l m n o p q r s t u v w x y z > echo {1..10..2} #range 1 to 10 in steps of 2 (i.e. ...
40detectives's user avatar
2 votes
0 answers
316 views

zsh change RPROMPT time on enter

I have found resources on configuring zsh's right prompt (RPROMPT) to be the date and time and this works great. However the time the prompt renders (after the last command) and the time that I press ...
Oliver Williams's user avatar
2 votes
0 answers
415 views

How to make fzf respect `FZF_DEFAULT_COMMAND` when using it through `FZF_COMPLETION_TRIGGER`?

As stated in the README, fzf only honors FZF_DEFAULT_COMMAND when invoked directly, and there is a separate setting FZF_CTRL_T_COMMAND. However, when I type a file pattern followed by a completion ...
user102780's user avatar
2 votes
0 answers
996 views

How do you set up MSYS2 to work like git for windows but with zsh? [closed]

Since the devs for git-for-windows are adamant of not expanding the installation size by 2MB to support zsh I am trying to see if I can just do it through msys2. So I can get zsh with the git-auto-...
Archimedes Trajano's user avatar
2 votes
1 answer
7k views

How to edit $PATH on MacOS Catalina (Zsh)?

I open terminal and use echo $PATH I get back: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin/ I'm confused because my .zshrc, .zsh, .bash_profile, .bashrc, and .profile all have ...
bedtimehero's user avatar
2 votes
2 answers
8k views

zsh: permission denied: ~/.bash_profile

I am trying to run the following to set env, but I can not: echo 'export ethereum_home=/Users/mattthomas/ethereum' >>~/.bash_profile Permissions for .bash_profile: -rw-r--r-- 1 root staff ...
Prasanna Desai's user avatar
2 votes
1 answer
509 views

iterm2 different directory for sourcing zshrc

I started playing around with shell scripting and set up zsh via iTerm2 on my MacBook. I set a zsh directory in .config so to organise my .zshrc and .zshenv config files, but when I launch iTerm2 it ...
baggiponte's user avatar
2 votes
1 answer
2k views

OS X Catalina: update_terminal_cwd:11: unrecognized modifier `i'

In .zshrc be sure to have # .zshrc # Source global definitions if [ -f /etc/zshrc ]; then . /etc/zshrc fi instead of # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /...
Pietro Oliva's user avatar
2 votes
1 answer
470 views

Add shell (bash/zsh) tab completion to custom command by running existing completion with arguments

In our code base we have a few convenience executables that are automatically loaded to the environment for anyone cloning the code (using direnv). This is a general question, but for the purpose of ...
Enrico's user avatar
  • 121
2 votes
1 answer
166 views

Zsh configuration line navigation

I am using VSCode and I have this nice behaviour: when I do alt-right-arrow from the end of the line, it stops at foo/bar/test_wait_what ^ ^ ^ ^ and when I do delete+alt, it deletes ...
Pierre Marchand's user avatar
2 votes
0 answers
2k views

remote zsh doesn't print in 256 color though terminal can print

I want to print my remote Zsh print in 256 color. But as you can see, terminal itself can print all colors, Zsh theme only prints in 8 the color version. Test codes here: curl -s https://gist....
jinhwan's user avatar
  • 121
2 votes
0 answers
307 views

tmux not updating zsh_history anymore

My distro recently got updated by our support group, which updated tmux. I used to have the following nice behavior: If I run a command in pane A, switch to pane B, press Enter once, I get the command ...
fabian789's user avatar
  • 155
2 votes
0 answers
238 views

Why does my PS1 environment variable keep getting overwritten?

I'm trying to customize the prompt by adding a line such as export PS1='%d' to my .zshrc file. However the environment variable keeps getting overwritten. In fact I can do the following at the ...
Sebastian Oberhoff's user avatar
2 votes
0 answers
959 views

Is it possible to configure Anaconda Prompt to use different Shells?

Is it possible to configure Anaconda Prompt to use a different shell environment from the default installation on Windows-10? I can't find any documenation specifying the Shell Anaconda Prompt uses, ...
xtian's user avatar
  • 995
2 votes
0 answers
778 views

ConEmu + msys2 zsh

On ConEmu page concerning the cygwin/msys terminal connector there are examples related to conemu-cyg-64.exe. I readapted them to conemu-msys2-64 in ConEmu 171109 as follows (line breaks are for ...
antonio's user avatar
  • 947
2 votes
1 answer
348 views

Will setting the $HOME variable to a symlink of my current home cause any issues?

I am using macOS and my shell is zsh. By default, my system's home directory is /Users/njohn. I created a symlink to this path, /usr/local/home. I put HOME="/usr/local/home" in my .zshrc. I did this ...
N. Johnathon's user avatar
2 votes
1 answer
264 views

zsh: Ambiguous completion only to file/directory names

I'm trying to have zsh supplement underscores when completing a file/directory name. That is to say, $ ls mod_* mod_sample $ modsa<Press Tab> # Here I want 'mod_sample' to appear as a candidate ...
aosho235's user avatar
2 votes
0 answers
2k views

How to make oh-my-zsh path display on macOS case sensitive?

Oh-my-zsh on macOS case-insensitive filesystem displays the actual path relative to how you type it. I was wondering can I make it display ~/Test even if I type cd test. Image:
eyq02386's user avatar
2 votes
0 answers
2k views

Broken zsh with chmod; trying to fix with compaudit

I have Homebrew zsh as my shell. I don't have root on my machine, but I do have an additional account with elevated privileges -- this is just how it's been set up by my work and I can't do anything ...
Xophmeister's user avatar
2 votes
1 answer
2k views

How to select text in Iterm using hotkeys

I am using iTerm as terminal and zsh with oh-my-zsh as shell. Sometimes I would like to select part of entered command only using hot keys. How can I do it?
Voldemar Duletskiy's user avatar
2 votes
2 answers
319 views

How to Keep Dot-Files up to date?

I've got two computers, one at work and one at home. The work one has a VM running Arch, and the home one runs Arch natively. The work one usually stays at work, but push a lot of stuff back and ...
testname123's user avatar
2 votes
0 answers
740 views

Strange prompt color issue with Solarized and OSX 10.11 Terminal.app

I am trying out some Terminal.app customization and have switched from the stock bash to zsh with oh-my-zsh. I have installed patched Powerline fonts and the a port of Solarized theme for the 256-...
erikejan's user avatar
2 votes
1 answer
272 views

What is a close option in zsh to readline's `completion-prefix-display-length`

When completing, if the typed part is long, this option replaces the same part in the completion menu items with ellipsis. Especially useful if the typed part is long and there are many candidates.
xuhdev's user avatar
  • 1,781
2 votes
1 answer
738 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 ...
badfilms's user avatar
2 votes
1 answer
1k 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 ...
Victor Aurélio's user avatar
2 votes
0 answers
1k 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" ...
LotAbout's user avatar
  • 121
2 votes
0 answers
483 views

Zsh autocompleting cd with other people's home directories

Found this weird behavior with zsh autocompletion for cd. For some reason, if I write the prefix of a username after cd and press tab it will autocomplete to username/ and try to cd to that user's ...
toth's user avatar
  • 121
2 votes
0 answers
338 views

Neither less or less -X clear screen on exit. (Trust me, I googled....)

Neither less or less -X clear screen on exit. At the same time, vim does.... Env iTerm2, protocol mosh, server Centos + tmux + zsh iTerm2: report term as xterm-256color tmux: set -g terminal-...
Jiesi Luo's user avatar
2 votes
4 answers
513 views

Rename selfdefined function

Having a precmd() that does quite a lot, like checking for VCS information, I want to disable it when I'm navigating on slow mounted network drives. I came up with the following with which I can say ...
exic's user avatar
  • 469
2 votes
1 answer
171 views

Keep tmux title from `fg` to original jobname

I'm using Eevee's .zshrc/.tmux.conf. When I'm running a vim session, and I do Ctrl+z and then ⚘ fg, then it changes my tmux pane title to fg. I'd rather it change back to vim whatever.txt, or ...
Wayne Werner's user avatar
  • 2,333
2 votes
1 answer
2k views

Gem Binaries not found with oh-my-zsh

I'm using Oh-My-Zsh on Mountain Lion and have an issue with gem binaries not loading properly. For instance: If I load a new shell the binary still cannot be found. When using Bundler, I can load ...
Neil Middleton's user avatar
2 votes
1 answer
350 views

In zsh the date format for names isn't displayed properly

I don't know what's wrong or if I'm stupid or something, but I just can't get to display the date with words :( I've been trying this for hours now.. It should display Mon, but it displays a "M" ...
mitja's user avatar
  • 21
2 votes
2 answers
707 views

Tmux + urxvt ghost activity notifications

Im using tmux on urxvt, I have activity monitoring turned on and i noticed that all tmux windows get an activity notification after every 10~15 seconds, when i switch to that window there is nothing. ...
jagguli's user avatar
  • 239
2 votes
1 answer
2k views

man: command not found in zsh (Mac OS 10.58)

I changed to zsh from the default (by changing the "Shells open with" preference in Terminal to "command (complete path)" set to /bin/zsh While most things seem to work, I tried to see the man page ...
Oscar's user avatar
  • 21
2 votes
1 answer
827 views

Zsh's yank-pop is not working

In bash, you can kill words (Alt-Backspace) or lines (Ctrl-k), and yank them back later with C-y, and cycling the kill-ring with Alt-y. Now when I'm using zsh, it is weird that Alt-y is not working (...
Limbo Peng's user avatar
2 votes
1 answer
3k views

Copy files from m3u to destination

I have a playlist, m3u extended, formated like: #EXTM3U #EXTINF:213,2 Tåst - (foo bar) /home/www/Music/Test/test 123 - test.mp3 My problem is, that it seems the line-break is encoded as '\n\r' ...
www's user avatar
  • 31
2 votes
2 answers
1k views

OS X 10.6: How do I temporarily change $PATH for ZSH?

I'd like to create a script that sets the $PATH to a set of directories chosen by me (thus ignoring the predefined paths, such as /usr/bin, /usr/local/bin and so on...) followed by launching ZSH. ...
totte's user avatar
  • 191
2 votes
1 answer
608 views

can I bind hotkey for zsh?

I want to bind <C-h> to execute tmux slect-window -t -1, <C-l> to execute tmux slect-window -t +1 in zsh, can I do it?
guilin 桂林's user avatar
2 votes
0 answers
2k views

File completion colors for zsh

When I use Tab to complete a filename and more than one file matches, zsh uses an unsuitable color. Consider the following screenshot which exemplifies the problem: I have entered vi .zsh and pressed ...
Nickolay Kolev's user avatar
2 votes
2 answers
847 views

Zsh: How can I disable the "searching..."-feature?

When I misspell a command or directory and press enter, zsh first says command not found, but then displays the annoying "searching..." text, which can take a few seconds to show me, that nothing has ...
java.is.for.desktop's user avatar
2 votes
1 answer
696 views

Adding a trigger command to autocomplete function in zsh

When you define an alias like alias g=git, the shell will pick it up and run the corresponding autocomplete function. Now, there's a program out there called hub, which is basically a supserset of git,...
mkaito's user avatar
  • 2,072
2 votes
1 answer
4k views

Rails "Cannot read termcap database;"

Whenever I start my rails console I'm running into two problems: I'm getting these cryptic errors messages. My control-L isn't working (it's intended use it to clear the screen) Console output: $ ...
mbigras's user avatar
  • 577
1 vote
3 answers
2k views

Is it possible (feasible) to format (fold) Node.js terminal output JSON?

I'm a frontend developer, and I'm unfamiliar with command line tools for Node.js I currently use iTerm with zShell, but I can't find any resources online about folding console output (similar to how ...
neaumusic's user avatar
  • 243
1 vote
2 answers
2k views

git using different version of vim than zsh

I've got a plugin called YouCompleteMe installed in vim. When vim starts with this plugin installed, it will raise a warning if the version of vim is under the minimum required. I'm using vim 7.3.754,...
asfallows's user avatar
  • 1,031

1
13 14
15
16 17
29