chore: mostly cleanup and formatting

This commit is contained in:
Gal Szkolnik 2022-08-03 22:43:35 -04:00
parent bd4bc1b7ee
commit ab3e8132cc
4 changed files with 10 additions and 6 deletions

View file

@ -1,6 +1,8 @@
alias which-command="type -fP "
function add-alias-to-bash-completion-code() {
local CMD=$(printf "%s" "sed '" 's/\(complete\W.*-F\W.*chezmoi\)/\1 ' "$1/g'")
local CMD=$(printf "%s" "sed '" 's/\(complete\W.*-F\W.*' "$1" '.*$\)/\1 ' "$2/g'")
[[ -r "$3" ]] && CMD="$CMD -i $3"
[[ -n "$4" ]] && CMD="$4 $CMD"
eval "$CMD"
}