Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
6c08286c
Commit
6c08286c
authored
Oct 04, 2016
by
Marc Cornellà
Browse files
Use `$commands[]` to check for command existence
parent
efa7c7b7
Changes
1
Show whitespace changes
Inline
Side-by-side
lib/theme-and-appearance.zsh
View file @
6c08286c
...
...
@@ -19,7 +19,8 @@ then
colorls
-G
-d
.
&>/dev/null 2>&1
&&
alias ls
=
'colorls -G'
else
# For GNU ls, we use the default ls color theme. They can later be overwritten by themes.
type dircolors
>
/dev/null 2>&1
&&
eval
"
$(
dircolors
)
"
((
$+
commands[dircolors]
))
&&
eval
"
$(
dircolors
)
"
ls
--color
-d
.
&>/dev/null 2>&1
&&
alias ls
=
'ls --color=tty'
||
alias ls
=
'ls -G'
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment