mirror of
https://github.com/Gator96100/ProxSpace.git
synced 2025-07-30 19:40:12 -07:00
13 lines
317 B
Bash
13 lines
317 B
Bash
command_not_found_handler() {
|
|
local pkgs cmd="$1"
|
|
|
|
pkgs=(${(f)"$(pkgfile -b -v -- "$cmd" 2>/dev/null)"})
|
|
if [[ -n "$pkgs" ]]; then
|
|
printf '%s may be found in the following packages:\n' "$cmd"
|
|
printf ' %s\n' $pkgs[@]
|
|
return 0
|
|
fi
|
|
|
|
printf 'zsh: command not found: %s\n' "$cmd" 1>&2
|
|
return 127
|
|
}
|