mirror of
				https://github.com/dcarrillo/prezto.git
				synced 2025-11-04 15:39:09 +00:00 
			
		
		
		
	homebrew: Replace deprecated casks with their brew counterpart
Homebrew has deprecated `brew cask cleanup` and `brew cask search` in favor of `brew cleanup` and `brew search` respectively. They will stop working on 2018-09-30. Further, `--outdated` has been removed. We should eventually remove the related aliases, but for a while we keep supporting them gracefully with deprecation warning. The documentation has been removed from README.md, however.
This commit is contained in:
		@@ -29,12 +29,9 @@ Aliases
 | 
			
		||||
### Homebrew Cask
 | 
			
		||||
 | 
			
		||||
  - `cask` is aliased to `brew cask`.
 | 
			
		||||
  - `caskc` cleans up old cached downloads.
 | 
			
		||||
  - `caskC` cleans up all cached downloads.
 | 
			
		||||
  - `caski` installs a cask.
 | 
			
		||||
  - `caskl` lists installed casks.
 | 
			
		||||
  - `casko` lists casks which have an update available.
 | 
			
		||||
  - `casks` searches for a cask.
 | 
			
		||||
  - `caskx` uninstalls a cask.
 | 
			
		||||
 | 
			
		||||
Authors
 | 
			
		||||
 
 | 
			
		||||
@@ -36,10 +36,21 @@ alias brewx='brew remove'
 | 
			
		||||
 | 
			
		||||
# Homebrew Cask
 | 
			
		||||
alias cask='brew cask'
 | 
			
		||||
alias caskc='brew cask cleanup --outdated'
 | 
			
		||||
alias caskC='brew cask cleanup'
 | 
			
		||||
alias caskc='hb_deprecated brew cask cleanup'
 | 
			
		||||
alias caskC='hb_deprecated brew cask cleanup'
 | 
			
		||||
alias caski='brew cask install'
 | 
			
		||||
alias caskl='brew cask list'
 | 
			
		||||
alias casko='brew cask outdated'
 | 
			
		||||
alias casks='brew cask search'
 | 
			
		||||
alias casks='hb_deprecated brew cask search'
 | 
			
		||||
alias caskx='brew cask uninstall'
 | 
			
		||||
 | 
			
		||||
function hb_deprecated {
 | 
			
		||||
  local cmd="${argv[3]}"
 | 
			
		||||
  local cmd_args=( ${(@)argv:4} )
 | 
			
		||||
 | 
			
		||||
  printf "'brew cask %s' has been deprecated, " "${cmd}"
 | 
			
		||||
  printf "using 'brew %s' instead\n" "${cmd}"
 | 
			
		||||
 | 
			
		||||
  cmd_args=( ${(@)argv:4} )
 | 
			
		||||
  command brew "${cmd}" ${(@)cmd_args}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user