Skip to content

Commit

Permalink
Add newlines to PROMPT_COMMAND install string (#59)
Browse files Browse the repository at this point in the history
* Add newlines to PROMPT_COMMAND install string for #58

* Updating to use newlines
  • Loading branch information
rcaloras authored Oct 18, 2017
1 parent 0028c15 commit ed519db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bash-preexec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ __bp_install_after_session_init() {
# trap. __bp_install sets PROMPT_COMMAND to its final value, so these are only
# invoked once.
# It's necessary to clear any existing DEBUG trap in order to set it from the install function.
PROMPT_COMMAND='__bp_trap_string=$(trap -p DEBUG); trap DEBUG; __bp_install'
# Using \n as it's the most univer delimiter of bash commands
PROMPT_COMMAND=$'\n__bp_trap_string="$(trap -p DEBUG)"\n trap DEBUG\n __bp_install\n'
}

# Run our install so long as we're not delaying it.
Expand Down

0 comments on commit ed519db

Please # to comment.