dotfiles.2022/_home/dot_sz.shrc.d/bash.pre/21_aliases

12 lines
307 B
Text
Raw Normal View History

2022-10-05 22:29:21 -04:00
alias which-command="type -fP "
function which-command() {
type -fP "${@}"
}
2022-06-18 14:44:42 -04:00
2022-08-02 07:26:18 -04:00
function add-alias-to-bash-completion-code() {
2022-08-03 22:43:35 -04:00
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"
2022-08-02 07:26:18 -04:00
eval "$CMD"
}