Questions tagged [zsh]
Zsh is a shell designed for interactive use, although it is also a powerful scripting language.
1,449 questions
0
votes
1
answer
116
views
How can I build a script to continuously query mdutil on a volume until it stops indexing releasing that resource to being able to disable it?
I need to turn off the indexing/Spotlight in a volume to rebuild the index/search.
(To then: Full Disk Access >> sudo rm -rv /Volumes/MY-VOLUME/.Spotlight-V100 >> sudo killall mds >>...
2
votes
1
answer
748
views
When running VS Code remote ssh, zsh doesn't have VS Code in $PATH
I'm running VS Code with Remote SSH. When I open a zsh terminal, the entry in $PATH is missing for VS Code server, and so I can't run code --wait filename (which I like to have set as my $EDITOR ...
1
vote
2
answers
177
views
What is log command or function in zsh shell?
Tried looking in manual zshbuiltins, nothing is mentioned
Tried running:
which log
log: shell built-in command
log
doesn't return anything
log 1
log: too many arguments
0
votes
1
answer
785
views
How to configure the macOS terminal path to add the Homebrew path? [duplicate]
I am using macOS 15.5 and I configured the terminal via the settings.
I changed the color, size, etc., and saved it.
After installing Homebrew, I wanted to include the path in the configuration file.
...
1
vote
0
answers
246
views
How to get tmux to send the right char sequence for Ctrl + Enter and Ctrl + Shift + Enter shortcuts?
I am trying to get the following keyboard shortcuts working in neovim inside a wezterm+zsh+tmux session.
Ctrl + Enter: create a newline below the cursor in insert mode and move the cursor there with ...
4
votes
1
answer
801
views
Extremely slow Terminal startup on macOS Sequoia (M3 Mac Pro)
Problem
On my new M3 Mac Pro (36 GB RAM) running macOS Sequoia 15.3.2, launching a new interactive shell in both the built‑in Terminal.app and the GPU‑accelerated Ghostty takes orders of magnitude ...
0
votes
1
answer
342
views
Prevent commands with leading space from showing up in .zsh_history and .zsh_sessions on macOS
I would like commands with a leading space to not show up in any shell history. I'm using zsh.
I have the following option set at the bottom of my ~/.zshrc, however it does not seem to work as I ...
1
vote
1
answer
666
views
'sudo -u' gives error "sorry, try again" for password - even though its correct
I'm trying to run a command from a non-superuser account on my Mac (Ventura 13.7, zsh terminal). I tried:
sudo -u username
sudo -u UserName
sudo -u "User Name"
After running all of them it ...
1
vote
0
answers
305
views
Zsh completion: Is it possible to change the completion of a given command after pressing `<TAB>`?
Say I do this in an interactive zsh process: vim <TAB>, usually, it would complete with a list of files and directories, which looks like it uses GNU's ls, it even follows the $LS_COLORS ...
3
votes
1
answer
227
views
zsh: Bind alt+enter to line continuation
How do I map the key combo alt + enter to do a line continuation (without executing the command)?
I want the following end result:
> echo \
"hello"
After typing the echo-command, I want ...
0
votes
0
answers
192
views
Vim shows empty screen in oh-my-zsh on cygwin
When i start vim on the command line or git opens it to edit a comment, all I get is a empty screen with some zzzz. The only way to get out of this is to shutdown the terminal.
This happens with ...
1
vote
1
answer
128
views
New version of zsh still shows old value of $SHELL variable
I have recently upgraded zsh 5.7.1 to zsh 5.9 and I have two zsh executables now at /bin/zsh (the old one) and at /usr/local/bin/zsh. I have changed my login shell in the general properties dialog of ...
3
votes
2
answers
531
views
zsh alternate while-loop unexpected output
I am on ZSH_VERSION=5.9 and I have this script which works as expected:
integer count=3
while true ; do
echo $count
(( count-- ))
if (( count == 0 )) break
done
echo Finally: $count
echo ...
2
votes
2
answers
483
views
Why am I unable to remove attributes from files using xattr on macOS?
I've been trying to remove attributes from files so I can compile bgfx for my phone but I'm having problems with the code sign failing because:
"resource fork, Finder information, or similar ...
1
vote
0
answers
266
views
How to temporarily disable history in zsh like bash at the end of the session?
In bash if we run unset HISTFILE at the end of the session then it does not save the commands that ran during that session.
But in zsh, after we run unset HISTFILE or fc -p, it stops recording ...