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
Ohmyzsh
Commits
9eadaf56
Commit
9eadaf56
authored
Mar 25, 2014
by
Patrick Stadler
Browse files
brew-cask plugin: use spaces instead of tabs
parent
69fa67cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/brew-cask/brew-cask.plugin.zsh
View file @
9eadaf56
...
@@ -9,76 +9,76 @@ compdef _brew-cask brew
...
@@ -9,76 +9,76 @@ compdef _brew-cask brew
_brew-cask
()
_brew-cask
()
{
{
local
curcontext
=
"
$curcontext
"
state line
local
curcontext
=
"
$curcontext
"
state line
typeset
-A
opt_args
typeset
-A
opt_args
_arguments
-C
\
_arguments
-C
\
':command:->command'
\
':command:->command'
\
':subcmd:->subcmd'
\
':subcmd:->subcmd'
\
'*::options:->options'
'*::options:->options'
case
$state
in
case
$state
in
(
command
)
(
command
)
__call_original_brew
__call_original_brew
cask_commands
=(
cask_commands
=(
'cask:manage casks'
'cask:manage casks'
)
)
_describe
-t
commands
'brew cask command'
cask_commands
;;
_describe
-t
commands
'brew cask command'
cask_commands
;;
(
subcmd
)
(
subcmd
)
case
"
$line
[1]"
in
case
"
$line
[1]"
in
cask
)
cask
)
if
((
CURRENT
==
3
))
;
then
if
((
CURRENT
==
3
))
;
then
local
-a
subcommands
local
-a
subcommands
subcommands
=(
subcommands
=(
"alfred:used to modify Alfred's scope to include the Caskroom"
"alfred:used to modify Alfred's scope to include the Caskroom"
'audit:verifies installability of casks'
'audit:verifies installability of casks'
'checklinks:checks for bad cask links'
'checklinks:checks for bad cask links'
'cleanup:cleans up cached downloads'
'cleanup:cleans up cached downloads'
'create:creates a cask of the given name and opens it in an editor'
'create:creates a cask of the given name and opens it in an editor'
'doctor:checks for configuration issues'
'doctor:checks for configuration issues'
'edit:edits the cask of the given name'
'edit:edits the cask of the given name'
'fetch:downloads Cask resources to local cache'
'fetch:downloads Cask resources to local cache'
'home:opens the homepage of the cask of the given name'
'home:opens the homepage of the cask of the given name'
'info:displays information about the cask of the given name'
'info:displays information about the cask of the given name'
'install:installs the cask of the given name'
'install:installs the cask of the given name'
'list:with no args, lists installed casks; given installed casks, lists installed files'
'list:with no args, lists installed casks; given installed casks, lists installed files'
'search:searches all known casks'
'search:searches all known casks'
'uninstall:uninstalls the cask of the given name'
'uninstall:uninstalls the cask of the given name'
"update:a synonym for 'brew update'"
"update:a synonym for 'brew update'"
)
)
_describe
-t
commands
"brew cask subcommand"
subcommands
_describe
-t
commands
"brew cask subcommand"
subcommands
fi
;;
fi
;;
*
)
*
)
__call_original_brew
;;
__call_original_brew
;;
esac
;;
esac
;;
(
options
)
(
options
)
local
-a
casks installed_casks
local
-a
casks installed_casks
local
expl
local
expl
case
"
$line
[2]"
in
case
"
$line
[2]"
in
list|uninstall
)
list|uninstall
)
__brew_installed_casks
__brew_installed_casks
_wanted installed_casks expl
'installed casks'
compadd
-a
installed_casks
;;
_wanted installed_casks expl
'installed casks'
compadd
-a
installed_casks
;;
audit|edit|home|info|install
)
audit|edit|home|info|install
)
__brew_all_casks
__brew_all_casks
_wanted casks expl
'all casks'
compadd
-a
casks
;;
_wanted casks expl
'all casks'
compadd
-a
casks
;;
esac
;;
esac
;;
esac
esac
}
}
__brew_all_casks
()
{
__brew_all_casks
()
{
casks
=(
`
brew cask search
`
)
casks
=(
`
brew cask search
`
)
}
}
__brew_installed_casks
()
{
__brew_installed_casks
()
{
installed_casks
=(
`
brew cask list
`
)
installed_casks
=(
`
brew cask list
`
)
}
}
__call_original_brew
()
__call_original_brew
()
{
{
local
ret
=
1
local
ret
=
1
_call_function ret _brew
_call_function ret _brew
compdef _brew-cask brew
compdef _brew-cask brew
}
}
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