Skip to content

bash: __bp_last_argument_prev_command: parameter null or not set #56

Closed Answered by erhhung
erhhung asked this question in Support ticket
Discussion options

You must be logged in to vote

Figured out the issue I was having, which was caused by me messing around with the important $PROMPT_COMMAND environment variable inside my "~/.bash_profile" after the CodeWhisperer pre block:

# CodeWhisperer pre block. Keep at the top of this file.
[[ -f "${HOME}/Library/Application Support/codewhisperer/shell/bash_profile.pre.bash" ]] && builtin source "${HOME}/Library/Application Support/codewhisperer/shell/bash_profile.pre.bash"

_bash_history_sync() {
  builtin history -a
}

# DON'T JUST REPLACE PROMPT_COMMAND
PROMPT_COMMAND="_bash_history_sync"

Always append to existing $PROMPT_COMMAND:

if [[ "$PROMPT_COMMAND" != *_bash_history_sync* ]]; then
  PROMPT_COMMAND="_bash_history_sync; $P…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by brendanfalk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment