aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2021-09-08 20:06:17 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2021-09-08 20:06:17 -0400
commitb07669d3c5436f31f83a3796eb3286eb43aae0a7 (patch)
tree9f6c1cb58c745b4c544db97cdb31fb70c27be8ee
parentbebc075ecb76e322409950256de6793e8603f4f4 (diff)
downloaddotfiles-b07669d3c5436f31f83a3796eb3286eb43aae0a7.tar.gz
dotfiles-b07669d3c5436f31f83a3796eb3286eb43aae0a7.tar.xz
Only run the completion scripts if the files/directories are there
-rw-r--r--kshrc8
1 files changed, 6 insertions, 2 deletions
diff --git a/kshrc b/kshrc
index 321dcab..4c42f3a 100644
--- a/kshrc
+++ b/kshrc
@@ -663,9 +663,13 @@ elif [ -n "$KSH_VERSION" ] ; then
set -o emacs
#shellcheck disable=SC2155
- set -A complete_pass -- show find otp grep insert edit generate rm mv cp \
+ [ -r ~/.password-store ] && \
+ set -A complete_pass -- show find otp grep insert edit generate \
+ rm mv cp \
$(showPasswordStore ~/.password-store)
- set -A complete_ssh -- -L -D -A -X $(showsshhosts | awk '{print $1}')
+ [ -r ~/.ssh/config ] && \
+ set -A complete_ssh -- -L -D -A -X \
+ $(showsshhosts | awk '{print $1}')
# if you want PWD
# export PS1='\u@\h \$PWD \$ '