Add broot function
This commit is contained in:
parent
cea5deea4a
commit
71131a52b9
15
zshrc
15
zshrc
@ -706,3 +706,18 @@ if ! zplug check --verbose; then
|
|||||||
fi
|
fi
|
||||||
zplug load
|
zplug load
|
||||||
|
|
||||||
|
#---------------------------------- Broot ------------------------------------
|
||||||
|
function br {
|
||||||
|
local cmd cmd_file code
|
||||||
|
cmd_file=$(mktemp)
|
||||||
|
if broot --outcmd "$cmd_file" "$@"; then
|
||||||
|
cmd=$(<"$cmd_file")
|
||||||
|
command rm -f "$cmd_file"
|
||||||
|
eval "$cmd"
|
||||||
|
else
|
||||||
|
code=$?
|
||||||
|
command rm -f "$cmd_file"
|
||||||
|
return "$code"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user