mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
Update the plugins managment. Add the function 'omz-plugin' (inspired from bash-it)
This commit is contained in:
parent
d2725d44fc
commit
5c4f982ff7
417 changed files with 124 additions and 1 deletions
|
|
@ -1,26 +0,0 @@
|
|||
() {
|
||||
emulate -L zsh
|
||||
|
||||
if ! (( $+commands[cask] )); then
|
||||
print "zsh cask plugin: cask command not found" >&2
|
||||
return
|
||||
fi
|
||||
|
||||
cask_base=${commands[cask]:h:h}
|
||||
|
||||
# Plain cask installation location (for Cask 0.7.2 and earlier)
|
||||
comp_files=($cask_base/etc/cask_completion.zsh)
|
||||
|
||||
# Mac Homebrew installs the completion in a different location
|
||||
if (( $+commands[brew] )); then
|
||||
comp_files+=($(brew --prefix)/share/zsh/site-functions/cask_completion.zsh)
|
||||
fi
|
||||
|
||||
# Load first found file
|
||||
for f in $comp_files; do
|
||||
if [[ -f "$f" ]]; then
|
||||
source "$f"
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue