complete condition command

`test` command to check `$LS_COMMON` argument exists. and merged
the next line.
pull/1313/head
Kai-Ming Guo 2019-01-22 17:19:35 +08:00 committed by GitHub
parent af1bf11748
commit 212eb6636e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -7,10 +7,9 @@ LS_COMMON="-hG"
LS_COMMON="$LS_COMMON --color=auto"
LS_COMMON="$LS_COMMON -I NTUSER.DAT\* -I ntuser.dat\*"
test -n "$LS_COMMON" &&
# alias
alias ls="command ls $LS_COMMON"
# setup the main ls alias if we've established common args
test -n "$LS_COMMON" && alias ls="command ls $LS_COMMON"
alias ll="ls -l"
alias la="ls -a"
alias lal="ll -a"