diff --git a/zshrc b/zshrc index 7924103..ba89fb8 100644 --- a/zshrc +++ b/zshrc @@ -706,3 +706,18 @@ if ! zplug check --verbose; then fi 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 +} +