From b07669d3c5436f31f83a3796eb3286eb43aae0a7 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Wed, 8 Sep 2021 20:06:17 -0400 Subject: Only run the completion scripts if the files/directories are there --- kshrc | 8 ++++++-- 1 file 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 \$ ' -- cgit v1.2.3