Skip to content

Commit

Permalink
Add -- alias. Let help work on Debian/Ubuntu derivates; alias help al…
Browse files Browse the repository at this point in the history
…ways.
  • Loading branch information
vaeth committed Oct 25, 2020
1 parent d300a3a commit 46491cc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# zshrc-mv

(C) Martin Väth (mvath at google.com)
(C) Martin Väth (martin at mvath.de)

This project is under the Creative Commons CC-BY-4.0 license.
SPDX-License-Identifier: CC-BY-4.0
Expand All @@ -27,9 +27,9 @@ in the mv overlay (available via layman).

Concerning the colors which `zshrc` sets, only the following cases are tested
(and probably things will look ugly in other cases):
1. You use a terminal with a black background (and the 256 colors are mainly
tested with xterm - with other terminals e.g. the highlighted colors
may look differently and maybe bad).
1. A terminal with a black background (and the 256 colors are mainly tested
with xterm - with other terminals e.g. the highlighted colors may look
differently and maybe bad).
My testing xresources for xterm contain:
```
XTerm*cursorColor: green
Expand Down Expand Up @@ -155,8 +155,8 @@ they exist:

or (as a gentoo user) install from the mv overlay.

If zsh-autosuggestions and auto-fu.zsh are both installed, only the former
is used by default. If you want to use the latter instead, set
If zsh-autosuggestions and auto-fu.zsh are both installed, only the former
is used by default. If you want to use the latter instead, set
`ZSHRC_PREFER_AUTO_FU` to a nonempty value. If you want to use both, set
instead `ZSHRC_USE_AUTO_FU` to a nonempty value.
To skip both, set `ZSH_SKIP_AUTO` to a nonempty value.
Expand Down
20 changes: 12 additions & 8 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ alias -g 'NUL'='>/dev/null'
alias -g 'NULL'='NUL'
alias -g 'NIL'='>&/dev/null'

# Let -- tacitly "reload" the current directory after filesystem changes.
# Note that the necessary option -q is not available in bash.

alias -- --='cd -q -- $PWD'

# Make noglob not work like "command" but expand aliases:

alias 'noglob'='noglob '
Expand Down Expand Up @@ -217,18 +222,17 @@ zshrc_whence && {

for HELPDIR in \
${DEFAULTS:+${^DEFAULTS%/}/zsh{-,/}help} \
${EPREFIX:+${^EPREFIX%/}/usr/share/zsh/help} \
${EPREFIX:+${^EPREFIX%/}/usr/share/zsh/$ZSH_VERSION/help} \
${EPREFIX:+${^EPREFIX%/}/usr/share/zsh/site-{contrib,functions}/help} \
/usr/share/zsh/$ZSH_VERSION/help \
/usr/share/zsh/{,$ZSH_VERSION/}help \
/usr/share/zsh/site-{contrib,functions}/help
do [[ -d $HELPDIR ]] && {
alias run-help NUL && unalias run-help
autoload -Uz run-help
alias help=run-help
[[ -n ${HELPDIR:++} ]] || unset HELPDIR
break
}
do [[ -d $HELPDIR ]] && break
done
alias run-help NUL && unalias run-help
autoload -Uz run-help
alias help=run-help
[[ -n ${HELPDIR:++} ]] || unset HELPDIR


# Define LS_COLORS if not already done in $interactive
Expand Down

0 comments on commit 46491cc

Please sign in to comment.