refactored some stuff
This commit is contained in:
parent
d31941c80c
commit
b1cbc649cc
11 changed files with 445 additions and 56 deletions
|
@ -1,7 +1,10 @@
|
|||
# Ubuntu
|
||||
[[ -e /etc/zsh_command_not_found ]] && source /etc/zsh_command_not_found
|
||||
|
||||
# Arch Linux
|
||||
[[ -e /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh
|
||||
|
||||
# Fedora
|
||||
if [ -f /usr/libexec/pk-command-not-found ]; then
|
||||
command_not_found_handler () {
|
||||
runcnf=1
|
||||
|
@ -16,3 +19,16 @@ if [ -f /usr/libexec/pk-command-not-found ]; then
|
|||
return $retval
|
||||
}
|
||||
fi
|
||||
|
||||
# OSX Homebrew
|
||||
# https://github.com/Homebrew/homebrew-command-not-found
|
||||
if [[ -s '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh' ]]; then
|
||||
source '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh'
|
||||
fi
|
||||
|
||||
# NixOS
|
||||
if [ -x /run/current-system/sw/bin/command-not-found ]; then
|
||||
command_not_found_handler () {
|
||||
/run/current-system/sw/bin/command-not-found $@
|
||||
}
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue