many bugfix, fixed getopt split
This commit is contained in:
@@ -592,6 +592,13 @@ _prompt_ctx_add()
|
||||
fi
|
||||
}
|
||||
|
||||
# Store the exit status of the user's last command (first command of a
|
||||
# PROMPT_COMMAND that also contains other commands, see profile.sh).
|
||||
_profile_save_status()
|
||||
{
|
||||
_profile_status=$?
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Function triggered internally by bash : defining prompt
|
||||
# Usage: set_prompt
|
||||
@@ -601,6 +608,12 @@ _prompt_ctx_add()
|
||||
set_prompt()
|
||||
{
|
||||
local Last_Command=$? # Must come first: nothing may run before this line
|
||||
# When other commands precede set_prompt in PROMPT_COMMAND (profile.sh adds
|
||||
# _profile_save_status first for that case), $? is theirs: use the saved one.
|
||||
if [[ -n "${_profile_status+x}" ]]; then
|
||||
Last_Command="$_profile_status"
|
||||
unset _profile_status
|
||||
fi
|
||||
local FancyX='\342\234\227'
|
||||
local Checkmark='\342\234\223'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user