diff options
author | Ashley Valent <avalent@atlassian.com> | 2015-02-11 11:22:15 +1100 |
---|---|---|
committer | Ashley Valent <avalent@atlassian.com> | 2015-02-11 11:22:15 +1100 |
commit | 3b6a695b60d81691ab8e31197fc8e0444df0e394 (patch) | |
tree | 84529e1bc0a54cdd9471e53c597e913797c04014 /plugins/command-not-found/command-not-found.plugin.zsh | |
parent | 3ba10ad0a2ed85c26e096126a7899a401cf8f9e7 (diff) | |
parent | ef7e53a78d0e4196c2d1e6e5b268209759d51753 (diff) | |
download | zsh-3b6a695b60d81691ab8e31197fc8e0444df0e394.tar.gz zsh-3b6a695b60d81691ab8e31197fc8e0444df0e394.tar.bz2 zsh-3b6a695b60d81691ab8e31197fc8e0444df0e394.zip |
Merge branch 'master' of github.com:avalent/oh-my-zsh
Diffstat (limited to 'plugins/command-not-found/command-not-found.plugin.zsh')
-rw-r--r-- | plugins/command-not-found/command-not-found.plugin.zsh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index f3d7ec2df..797554a13 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -7,3 +7,19 @@ # Arch Linux command-not-found support, you must have package pkgfile installed # https://wiki.archlinux.org/index.php/Pkgfile#.22Command_not_found.22_hook [[ -e /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh + +# Fedora command-not-found support +if [ -f /usr/libexec/pk-command-not-found ]; then + command_not_found_handler () { + runcnf=1 + retval=127 + [ ! -S /var/run/dbus/system_bus_socket ] && runcnf=0 + [ ! -x /usr/libexec/packagekitd ] && runcnf=0 + if [ $runcnf -eq 1 ] + then + /usr/libexec/pk-command-not-found $@ + retval=$? + fi + return $retval + } +fi |