Questions tagged [zsh]

64 questions
67
votes
10 answers

Unique Features of bash compared to zsh

I have been a zsh user for quite some time (before that tcsh and before that csh). I am quite happy with it, but was wondering if there are any compelling features of bash that do not exist in zsh. And conversely, are there zsh features which do not…
Tim
  • 1,879
  • 3
  • 18
  • 16
36
votes
8 answers

Is there any reason to use bash over zsh?

I'm curious about why one would want to run bash instead of zsh. I mean zsh is fully backwards-compatible with bash. Don't get me wrong: I don't dislike bash or anything. I just genuinely want to know if there are any advantages to using it over…
Jason Baker
  • 1,229
  • 6
  • 20
  • 25
27
votes
2 answers

How do I make zsh completion act more like bash completion?

I'm a recent convert from bash to zsh (which I'm using "oh my zsh" with), but one thing annoys me: When I hit the tab key, the first autocompletion is filled out automatically, and you need to cycle through the completions by hitting tab repeatedly.…
sanity
  • 709
  • 3
  • 9
  • 16
18
votes
4 answers

How to edit command completion for ssh on zsh?

I'd like to set up command completion on zsh to display host names after I type ssh [TAB] taking the names out of my .ssh/config file (and preferably from known_hosts and /etc/hosts and anywhere else that makes sense) and presenting one single…
iconoclast
  • 1,688
  • 2
  • 18
  • 30
16
votes
4 answers

Copy a range of files in command line (ZSH/BASH)

I have a list of files with consecutive numbers as suffixes. I would like to copy only a range of these files. How can I specify a range as part of my cp command. $ls P1080272.JPG* P1080273.JPG* P1080274.JPG* P1080275.JPG* P1080276.JPG*…
Amjith
  • 263
  • 1
  • 2
  • 5
15
votes
1 answer

ZSH not sourcing zprofile

I'm running zsh 5.1.1 on Ubuntu 16.04. It seems that ~/.zprofile isn't sourced at login nor new terminal. ~/.zshrc is sourced however. I am running oh-my-zsh. Any ideas on why this is or how I can fix it?
joedborg
  • 269
  • 1
  • 2
  • 6
15
votes
4 answers

How to delete empty source directories when moving folders with rsync?

rsync can be coaxed into moving folders very similarly and superiorly to traditional mv with the following options: rsync -axvvES --remove-source-files source_directory /destination/ However one thing I cannot yet seem to get it to do is to remove…
ylluminate
  • 1,001
  • 2
  • 15
  • 29
13
votes
1 answer

How to change default shell in FreeBSD?

The default shell in FreeBSD is sh and I really can't stand it: autocomplete is very limited, and rehash commands kill me. I feel like a one armed and one legged man... How can I change the shell globally to zsh or bash - for root and for all…
holms
  • 1,464
  • 7
  • 20
  • 37
12
votes
4 answers

Keyboard shortcut to store typed command and clean the line

You know the situation: You are halfway through typing a long command (for example a commit message) and realize that you have forgotten to execute some prerequisite command that can not be added with &&. Normally when that happens to me, I select…
chiborg
  • 1,043
  • 2
  • 13
  • 26
9
votes
3 answers

ls gives me "illegal option"

I recently installed zsh and now whenever I ls or ls -l or ls anything I get "illegal option". Not sure where to start looking to fix this.
pondermatic
  • 227
  • 2
  • 6
8
votes
1 answer

How to set the default shell when chsh is not present

I've a Synology DS412+ NAS box running Busybox, which has a default shell of ash. Previously, ipkg install optware-devel was run and it installed bash and set it as the default shell. Running ipkg install zsh has installed zsh but not set it as the…
ian
  • 229
  • 2
  • 4
  • 12
8
votes
3 answers

Excluding Environment Variables from ZSH Autocomplete

Quick example: ~ $ wor ~ $ WORDCHARS= …
Bryan Veloso
  • 183
  • 6
7
votes
2 answers

How can I open a file whose name starts with "-"?

I am running Ubuntu, and would like to open a file whose file name starts with "-"(minus). When I try to open the file with pico or vim, the command thinks that the "-" sign is an option for the command. I tried enclosing the file name with quotes…
PJ.
  • 3,007
  • 5
  • 20
  • 15
6
votes
2 answers

Unable to understand the benefit of Zsh's autopushd

I have in .zshrc setopt autopushd It makes cd acts like pushd. This means that we have no stack at all. When I have used it, I have not used stack at all, since it removes stack from me. I am not sure what is the benefit of autopushd. What is the…
6
votes
1 answer

Removing history or line numbers from ZSH history file

For some reason I get these odd line numbers or history numbers of some sort into my ~/.zsh_history file like so: : 1266694881:0;rake db:migrate I'd rather not have to resort to regexing out the beginning, but I'd like my lines to be something…
JP Silvashy
  • 1,387
  • 6
  • 22
  • 30
1
2 3 4 5