projects
/
grml-etc-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
zshrc: simplify ls alias setup; remove -F from ls aliases
[grml-etc-core.git]
/
etc
/
zsh
/
zshrc
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
4e06cde
..
d106274
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-358,12
+358,12
@@
ZSH_NO_DEFAULT_LOCALE=${ZSH_NO_DEFAULT_LOCALE:-0}
typeset -ga ls_options
typeset -ga grep_options
if ls --color=auto / >/dev/null 2>&1; then
typeset -ga ls_options
typeset -ga grep_options
if ls --color=auto / >/dev/null 2>&1; then
- ls_options=( --color=auto )
+ ls_options
+
=( --color=auto )
elif ls -G / >/dev/null 2>&1; then
elif ls -G / >/dev/null 2>&1; then
- ls_options=( -G )
+ ls_options
+
=( -G )
fi
if grep --color=auto -q "a" <<< "a" >/dev/null 2>&1; then
fi
if grep --color=auto -q "a" <<< "a" >/dev/null 2>&1; then
- grep_options=( --color=auto )
+ grep_options
+
=( --color=auto )
fi
# utility functions
fi
# utility functions
@@
-2442,17
+2442,16
@@
fi
# do we have GNU ls with color-support?
if [[ "$TERM" != dumb ]]; then
#a1# List files with colors (\kbd{ls -F \ldots})
# do we have GNU ls with color-support?
if [[ "$TERM" != dumb ]]; then
#a1# List files with colors (\kbd{ls -F \ldots})
- alias ls=
'command ls -F '${ls_options:+"${ls_options[*]}"}
+ alias ls=
"command ls ${ls_options:+${ls_options[*]}}"
#a1# List all files, with colors (\kbd{ls -la \ldots})
#a1# List all files, with colors (\kbd{ls -la \ldots})
- alias la=
'command ls -la '${ls_options:+"${ls_options[*]}"}
+ alias la=
"command ls -la ${ls_options:+${ls_options[*]}}"
#a1# List files with long colored list, without dotfiles (\kbd{ls -l \ldots})
#a1# List files with long colored list, without dotfiles (\kbd{ls -l \ldots})
- alias ll=
'command ls -l '${ls_options:+"${ls_options[*]}"}
+ alias ll=
"command ls -l ${ls_options:+${ls_options[*]}}"
#a1# List files with long colored list, human readable sizes (\kbd{ls -hAl \ldots})
#a1# List files with long colored list, human readable sizes (\kbd{ls -hAl \ldots})
- alias lh=
'command ls -hAl '${ls_options:+"${ls_options[*]}"}
+ alias lh=
"command ls -hAl ${ls_options:+${ls_options[*]}}"
#a1# List files with long colored list, append qualifier to filenames (\kbd{ls -lF \ldots})\\&\quad(\kbd{/} for directories, \kbd{@} for symlinks ...)
#a1# List files with long colored list, append qualifier to filenames (\kbd{ls -lF \ldots})\\&\quad(\kbd{/} for directories, \kbd{@} for symlinks ...)
- alias l=
'command ls -lF '${ls_options:+"${ls_options[*]}"}
+ alias l=
"command ls -l ${ls_options:+${ls_options[*]}}"
else
else
- alias ls='command ls -F'
alias la='command ls -la'
alias ll='command ls -l'
alias lh='command ls -hAl'
alias la='command ls -la'
alias ll='command ls -l'
alias lh='command ls -hAl'