dotfiles/dot_config/fish/functions/br.fish

20 lines
585 B
Fish
Raw Permalink Normal View History

2024-09-16 06:01:11 +02:00
# This script was automatically generated by the broot program
# More information can be found in https://github.com/Canop/broot
# This function starts broot and executes the command
# it produces, if any.
# It's needed because some shell commands, like `cd`,
# have no useful effect if executed in a subshell.
function br --wraps=broot
set -l cmd_file (mktemp)
if broot --outcmd $cmd_file $argv
read --local --null cmd < $cmd_file
rm -f $cmd_file
eval $cmd
else
set -l code $status
rm -f $cmd_file
return $code
end
end