mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 19:15:37 +00:00
better brews alias
This commit is contained in:
parent
2689810b1a
commit
2f90cee237
@ -6,9 +6,29 @@ function mactools
|
||||
cat $argv | pbcopy
|
||||
end
|
||||
|
||||
abbr -a brews 'vim $DOTS/homebrew/Brewfile'
|
||||
abbr -a casks 'vim $DOTS/homebrew/Caskfile'
|
||||
|
||||
function brews --description "Open Homebrew bundles file"
|
||||
set -lx brewdir $DOTS/homebrew
|
||||
set -l brewfile (basename $brewdir/*.Brewfile \
|
||||
| fzf \
|
||||
--height 70% \
|
||||
--preview-window right:70% \
|
||||
--preview 'bat --color=always $brewdir/{}' \
|
||||
)
|
||||
and vim $brewdir/$brewfile
|
||||
end
|
||||
|
||||
function brewinfo --description "Lookup brew plugins"
|
||||
set -l inst (brew search | eval "fzf $FZF_DEFAULT_OPTS -m --header='[brew:info]'")
|
||||
|
||||
if not test (count $inst) = 0
|
||||
for prog in $inst
|
||||
brew info "$prog"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function brewsearch --description "Install brew plugins"
|
||||
set -l inst (brew search | eval "fzf $FZF_DEFAULT_OPTS -m --header='[brew:install]'")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user