Andrew Tselischev <[email protected]> wrote:
> On Sun, Jul 12, 2015 at 06:52:35PM -0700, walt wrote:
[...]
>> http://wiki.redbrick.dcu.ie/mw/Account_Customisation_(zsh)

Note that this does not activate all features e.g. concerning
completion: You can have files displayed in your custom "ls"
colors in the "selection" list, you can have explanations about
the argument you are about to complete, you can have explanations
about the completing options being displayed in the list, etc.

I once more advertise zshrc-mv ...

Note that this sets the prompt only if you also install "set_prompt".

Also zsh-syntax-highlighting and auto-fu-zsh are supported
by zshrc-mv only if the packages are installed, of course:
I really like these features: One displays you commands, options,
strings, files, etc in different colors while typing, the other
"auto-completes" names for you while typing.
(Note that for combining both, you must install the development
versioen of auto-fu-zsh, since its author apparently does not
want to release non-git versions anymore.)

>> I made the change to PS1 permanent

set_prompt from the mv overlay can produce a prompt
for bash as well as for zsh.

In general, the zsh features for PS1 are also more powerful
than those of bash, e.g. it can automatically cut too long
texts. (Although set_prompt does not make use of these features,
becaues currently zsh does not autoamtically change colors in this
case which I wanted to have.)

However, be aware that some PS1 suggestions in the wild
(e.g. from the earlier mentioned oh-my-zsh) can turn out to be
a security risk. For instance, many custom prompts display
information about the git repository (if you are in some)
in an insecure way: I would noot rely that git cannot be
subject to some buffer overflow if e.g. you enter as root
a directory where some malicious user prepared a handcrafted .git ...

> zsh can also auto-complete all sorts of things, including process list
> for `kill' and `pkill', zfs datasets for the zfs and zpool commands...
> you can even write your own completions for any command.

Both is, in principle, also supported by bash, but usually the
zsh completion is better. Moreover, in contrast to bash completion,
it is easily customizable. For instance in the above mentioned
completion list for processes, you can have different colors
in the display for process numbers, tty, time, and name...
You can also select to have certain types being completed differently.
This is important if e.g. you prefer that "restricting" commands
like e.g. "mplayer ..." should not only provide the "typical" extensions
which mplayer is capable to display but really all files...

I write all this, because most of these things you do not know, still,
when you read the zsh manpage...


Reply via email to