zsh는 벌 칸용입니다. ;-)
진지하게 : bash 4.0에는 이전에 zsh에서만 발견 된 몇 가지 기능이 있습니다.
% ls /usr/src/**/Makefile
다음과 같습니다.
% find /usr/src -name "Makefile"
그러나 분명히 더 강력합니다.
내 경험상 bash의 프로그래밍 가능 완료는 적어도 일부 경우 (예 : 적성을 위해 데비안 패키지 완성)보다 zsh보다 약간 우수합니다.
bash는 Alt + .
삽입해야합니다!$
zsh has expansion of all variables, so you can use e.g.
% rm !$<Tab>
for this. zsh can also expand a command in backtics, so
% cat `echo blubb | sed 's/u/a/'`<Tab>
yields
% cat blabb
I find it very useful to expand rm *
, as you can see what would be removed and can maybe remove one or two files from the commmand to prevent them from being deleted.
Also nice: using the output from commands for other commands that do not read from stdin but expect a filename:
% diff <(sort foo) <(sort bar)
From what I read bash-completion also supports completing remote filenames over ssh if you use ssh-agent, which used to be a good reason to switch to zsh.
Aliases in zsh can be defined to work on the whole line instead of just at the beginning:
% alias -g ...="../.."
% cd ...