Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove trailing semicolon to allow appending to PROMPT_COMMANDS #41

Merged
merged 1 commit into from
May 9, 2017

Conversation

brandonweeks
Copy link
Contributor

Before:

$ source bash-preexec.sh
$ PROMPT_COMMAND="$PROMPT_COMMAND; true"
bash: PROMPT_COMMAND: line 3: syntax error near unexpected token `;;'
bash: PROMPT_COMMAND: line 3: `__bp_precmd_invoke_cmd;  __bp_interactive_mode;; true'
$ 

After:

$ source bash-preexec.sh
$ PROMPT_COMMAND="$PROMPT_COMMAND; true"
$ declare -p PROMPT_COMMAND
declare -- PROMPT_COMMAND="__bp_precmd_invoke_cmd;  __bp_interactive_mode; true"
$ 

@rcaloras
Copy link
Owner

rcaloras commented May 9, 2017

This one is more of a design decision right? I feel like you could argue that we should still end PROMPT_COMMAND with a semicolon and then just append without it.

@rcaloras
Copy link
Owner

rcaloras commented May 9, 2017

👍 Putting it through regardless. Thanks for all the PRs!

@brandonweeks ⭐ 🥇

alt-text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants