From d50c5ff0d2fc571e955c74e5fb83985e7a4b009f Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Tue, 23 Jan 2024 08:59:01 -0800 Subject: Prompt3 fixes --- .bashrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.bashrc b/.bashrc index 12f5e6e..cec587e 100644 --- a/.bashrc +++ b/.bashrc @@ -108,6 +108,14 @@ set bell-style none set completion-ignore-case on MY_SHELL=$(ps -o command -p $$ | awk '/^[^C]/ { print $1 }') + +# Prompt 3 runs through a host process that breaks normal shell detection +# but this can be discovered by looking at the PPID. This might be a bug +# in Prompt because it exposes the shell as just "-l". +if [[ "$(ps -c -o command -p $PPID | tail -n1)" =~ "PromptLocalTerminal" ]]; then + MY_SHELL="bash" +fi + if [[ "$MY_SHELL" =~ "bash" ]]; then shopt -s checkwinsize shopt -s cdspell -- cgit v1.2.3