Questions tagged [zsh]

Zsh or Z Shell is the default Unix shell used by Terminal in macOS since 10.15

Zsh, a Unix shell, is available in macOS as an alternative to the default Bash shell in Terminal app.

Zsh is an extension of the original Bourne shell and can be used both as interactive login shell or as a command interpreter for shell scripts.

442 questions
3
votes
2 answers

Can't test whether key exists in associative zsh array

This is my script (zsh 5.8): # Consider parameter expansion of an unset variable to be an error set -u # Define and populate associative array typeset -A arr arr=(x xxx y yyy) echo $arr[x] # Outputs xxx # Test whether key x is…
1
vote
0 answers

Terminal: can I configure the OPEN command to associate specific file extensions/types with specified applications?

Basically the full question is in the title already: can I configure the OPEN command to associate specific file extensions/types with specified applications?
1
vote
1 answer

zsh: how do I get ctrl-p and ctrl-n keys to perform history-search-backward/forward like in bash?

In zsh, I can search my history based on what has been typed on the command line so far with: bindkey "\e[A" history-search-backward bindkey "\e[B" history-search-forward So if I type in: ln -s som and hit the up arrow, it will show me the…
StevieD
  • 1,506
1
vote
3 answers

Rename .app and using the new name with open -a

I want to change the name of Visual Studio Code to vscode for using the command open -a vscode. Any idea how?
1
vote
1 answer

Error with Oh My ZSH themes, ZSH_THEME="random

I get the following message after installing Oh My ZSH and changing ZSH_THEME="robbyrussel" to ZSH_THEME="random" in .zshrc. Users/me/.oh-my-zsh/oh-my-zsh.sh:source:110: no such file or directory: /Users/me/.oh-my-zsh/themes/“random”.zsh-theme
1
vote
1 answer

Wierd character in zsh

I have problem with zsh at command line for non English language characters but after enter key the language show the right word. ~ ❯ สว<0e31>สด<0e35> สวัสดี zsh: command not found: สวัสดี i was check the locale everything is…
Kotzilla
  • 143
0
votes
1 answer

The recommended way to copy the contents of one directory into another

To copy the contents of one directory into another, I can use the following: cp -Rip source-dir/ ../destination-dir/ However, it seems that using the trailing slash at the end of source directory when using cp and mv commands is somewhat…
jsx97
  • 305