Merge branch 'master' of https://github.com/sorin-ionescu/prezto into patch-1
This commit is contained in:
commit
f68f659c4a
3 changed files with 47 additions and 13 deletions
|
@ -212,10 +212,17 @@ function git-info {
|
|||
|
||||
# Format stashed.
|
||||
zstyle -s ':prezto:module:git:info:stashed' format 'stashed_format'
|
||||
if [[ -n "$stashed_format" && -f "$(git-dir)/refs/stash" ]]; then
|
||||
stashed="$(command git stash list 2> /dev/null | wc -l | awk '{print $1}')"
|
||||
if [[ -n "$stashed" ]]; then
|
||||
zformat -f stashed_formatted "$stashed_format" "S:$stashed"
|
||||
if [[ -n "$stashed_format" ]]; then
|
||||
commondir=""
|
||||
if [[ -f "$(git-dir)/commondir" ]]; then
|
||||
commondir="$(<$(git-dir)/commondir)"
|
||||
[[ "$commondir" =~ ^/ ]] || commondir="$(git-dir)/$commondir"
|
||||
fi
|
||||
if [[ -f "$(git-dir)/refs/stash" || ( -n "$commondir" && -f "$commondir/refs/stash" ) ]]; then
|
||||
stashed="$(command git stash list 2> /dev/null | wc -l | awk '{print $1}')"
|
||||
if [[ -n "$stashed" ]]; then
|
||||
zformat -f stashed_formatted "$stashed_format" "S:$stashed"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
Homebrew
|
||||
========
|
||||
|
||||
Defines Homebrew aliases.
|
||||
Defines Homebrew specific shell environment variables and aliases.
|
||||
|
||||
Environment Variables
|
||||
---------------------
|
||||
|
||||
Execute the following to list the environment variables loaded in the shell:
|
||||
|
||||
```sh
|
||||
brew shellenv
|
||||
```
|
||||
|
||||
Aliases
|
||||
-------
|
||||
|
@ -20,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
|
||||
|
|
|
@ -10,6 +10,16 @@ if [[ "$OSTYPE" != (darwin|linux)* ]]; then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Environmental Variables
|
||||
#
|
||||
|
||||
# Load standard Homebrew shellenv into the shell session.
|
||||
# `brew shellenv` is relatively new, guard for legacy Homebrew.
|
||||
if (( $+commands[brew] )); then
|
||||
eval "$(brew shellenv 2> /dev/null)"
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
@ -21,15 +31,26 @@ alias brewi='brew install'
|
|||
alias brewl='brew list'
|
||||
alias brewo='brew outdated'
|
||||
alias brews='brew search'
|
||||
alias brewu='brew update && brew upgrade'
|
||||
alias brewx='brew remove'
|
||||
alias brewu='brew upgrade'
|
||||
alias brewx='brew uninstall'
|
||||
|
||||
# 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}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue