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

12 lines
307 B
Plaintext
Raw Normal View History

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