From f092e36589a663638b66ee79b52a04b43dfbcf4f Mon Sep 17 00:00:00 2001 From: Miriam L Rittenberg Date: Tue, 7 Jan 2020 22:28:44 -0500 Subject: [PATCH] Make kdo work in both zsh and bash --- kerberos/kdo | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kerberos/kdo b/kerberos/kdo index 05b841e..a043f52 100644 --- a/kerberos/kdo +++ b/kerberos/kdo @@ -64,7 +64,7 @@ fi # If kcaches and knewcache have been defined for this platform, then # setup kdo. Otherwise, add a helpful error. -if hash kcaches &>/dev/null && hash knewcache &>/dev/null; then +if type kcaches &>/dev/null && type knewcache &>/dev/null; then kfindcache () { kcaches | fgrep "$1" | cut -d' ' -f2- } @@ -99,7 +99,9 @@ if hash kcaches &>/dev/null && hash knewcache &>/dev/null; then COMPREPLY=($(compgen -c -- "${cur}")) esac } - complete -o bashdefault -F _kdo kdo + if type complete &>/dev/null; then + complete -o bashdefault -F _kdo kdo + fi else kdo () { -- 2.45.0