Questions tagged [zsh]

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

Many of the useful features of bash, ksh, and tcsh were incorporated into zsh; many original features were added.

1255 questions
251
votes
5 answers

Zsh not hitting ~/.profile

I've just installed zsh on my Ubuntu system. It seems zsh isn't executing ~/.profile on init. To my best understanding, this should be an automatic behavior. What am I missing?
shmichael
  • 2,873
  • 3
  • 14
  • 6
242
votes
3 answers

Why are tar.xz files 15x smaller when using Python's tar library compared to macOS tar?

Context I'm compressing ~1.3 GB folders each filled with 1440 JSON files and find that there's a 15-fold difference between using the tar command and Python's built-in tarfile library on macOS or Raspbian 10 (Buster) Minimal working example This…
Saaru Lindestøkke
  • 4,331
  • 7
  • 26
  • 44
201
votes
10 answers

How can I make tmux use my default shell?

On a new setup, tmux is using bash instead of my default (zsh). How can I force it to use zsh?
re5et
  • 2,123
  • 2
  • 13
  • 4
127
votes
9 answers

How can I do a recursive find and replace from the command line?

Using a shell like bash or zshell, how can I do a recursive 'find and replace'? In other words, I want to replace every occurrence of 'foo' with 'bar' in all files in this directory and its subdirectories.
Nathan Long
  • 24,089
  • 33
  • 97
  • 137
123
votes
2 answers

How to fix and recover a "corrupt history file" in zsh?

After a reboot, I started seeing a message when loading the shell: zsh: corrupt history file /home/myusername/.zsh_history How can I recover from this situation and potentially recover some of the history?
gak
  • 8,167
  • 10
  • 25
  • 28
95
votes
5 answers

Where is the .zshrc file on Mac?

I’m using iTerm and wanted to customize the look of my terminal window using Oh My ZSH!. And according to the documentation I need to change the ~/.zshrc file and add a ZSH_THEME value: Once you find a theme that you want to use, you will need to…
Leon Gaban
  • 1,825
  • 7
  • 27
  • 32
89
votes
3 answers

ZSH - output whole history?

I recently switched from bash to zsh. In bash, one way (besides recursive search) that I used to find previously-run commands was history | grep whatever, where whatever is the bit of command I remember. In zsh, this isn't working. history returns…
Nathan Long
  • 24,089
  • 33
  • 97
  • 137
83
votes
13 answers

zsh starts incredibly slowly

ZSH takes about a second and a half from creating a new terminal window to being ready. I'm pretty sure that the culprit is compinit. I haven't been able to find good documentation on compinit, but it looks like it should be caching all of the…
Eli
  • 933
  • 1
  • 7
  • 5
81
votes
6 answers

scp with zsh : no matches found

when I try scp over zsh, I get scp hostA:Descargas/debian-6.0.4-* user@192.168.1.154:Escritorio/Software/ zsh: no matches found: hostA:Descargas/debian-6.0.4-* the same command work in bash
juanpablo
  • 6,286
  • 9
  • 47
  • 70
77
votes
3 answers

What exactly is <() in bash (and =() in zsh)?

I'm pretty comfortable with bash, but recently I ended up in a substitution I didn't know. What exactly is <(command) in bash? How does it compare to the =(command) in zsh? I understand that this has something to do with default file descriptors. In…
Henrique Barcelos
  • 967
  • 1
  • 8
  • 10
66
votes
3 answers

iTerm/zsh not reading .bashrc OR .bash_profile

In ~/.bash_profile I have : if [ -f ~/.bashrc ]; then source ~/.bashrc fi In ~/.bashrc I have some aliases When I load a new iTerm window, my aliases do not work. If I source ~/.bashrc they work. If I source ~.bash_profile they work. Isn't at…
Damon
  • 2,649
  • 5
  • 23
  • 27
62
votes
9 answers

Change iTerm2 window and tab titles in zsh

I want to label the window tabs of terminal sessions. I'm using the zshell in iterm2 on OSX. Is it possible to change the label of a window tab dynamically in the terminal?
bneil
  • 1,657
  • 3
  • 14
  • 20
55
votes
6 answers

zsh (z shell) numpad/numlock doesn't work

I just upgraded to zsh/oh-my-zsh. Almost immediately I notice on my machine that the 10-digit numpad is not working. It was working in bash and fish shell. Oddly, if I hold down the fn/function key it acts like numlock and works, but it doesn't…
BradGreens
  • 653
  • 1
  • 6
  • 6
55
votes
3 answers

ZSH: Read command fails within bash function "read:1: -p: no coprocess"

Edit: Seems to work within bash. It appears the problem is related to zsh. If there is a better site to post this issue on let me know. I am writing a simple script that creates a series of directories. I want the user to give a confirmation…
Nick Tomlin
  • 847
  • 2
  • 8
  • 11
55
votes
2 answers

oh-my-zsh history completion

I have recently switched to zsh, using robbyrussell's oh-my-zsh. Before that i used bash with a lot of custom stuff and i am only missing one thing because zsh is trying to be 'too smart': If i type git commit and then ↑ zsh goes through all recent…
Patrick Oscity
  • 1,679
  • 1
  • 15
  • 19
1
2 3
83 84