Removed extra spaces and added PS2
This commit is contained in:
parent
4cc7e60f70
commit
94bada606b
14
prompt.sh
14
prompt.sh
@ -137,9 +137,9 @@ function build_prompt {
|
|||||||
fi
|
fi
|
||||||
if [[ ${detached} == true ]]; then
|
if [[ ${detached} == true ]]; then
|
||||||
if [[ ${just_init} == true ]]; then
|
if [[ ${just_init} == true ]]; then
|
||||||
PS1="${PS1} ${red}detached"
|
PS1="${PS1}${red}detached"
|
||||||
else
|
else
|
||||||
PS1="${PS1} ${on}(${current_commit_hash_abbrev})"
|
PS1="${PS1}${on}(${current_commit_hash_abbrev})"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ $has_upstream == true ]]; then
|
if [[ $has_upstream == true ]]; then
|
||||||
@ -159,17 +159,17 @@ function build_prompt {
|
|||||||
PS1="${PS1} ${on} ${should_push_symbol} +${commits_ahead}"
|
PS1="${PS1} ${on} ${should_push_symbol} +${commits_ahead}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
PS1="${PS1} (${green}${current_branch}${reset} ${type_of_upstream} ${upstream//\/$current_branch/})"
|
PS1="${PS1}(${green}${current_branch}${reset} ${type_of_upstream} ${upstream//\/$current_branch/})"
|
||||||
else
|
else
|
||||||
PS1="${PS1} ${on}(${green}${current_branch}${reset})"
|
PS1="${PS1}${on}(${green}${current_branch}${reset})"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${display_tag} == true ]]; then
|
if [[ ${display_tag} == true ]]; then
|
||||||
PS1="${PS1} ${yellow}${is_on_a_tag_symbol}${reset}"
|
PS1="${PS1}${yellow}${is_on_a_tag_symbol}${reset}"
|
||||||
fi
|
fi
|
||||||
if [ ${display_tag_name} == true -a ${is_on_a_tag} == true ]; then
|
if [ ${display_tag_name} == true -a ${is_on_a_tag} == true ]; then
|
||||||
PS1="${PS1} ${yellow}[${tag_at_current_commit}]${reset}"
|
PS1="${PS1}${yellow}[${tag_at_current_commit}]${reset}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -182,4 +182,6 @@ function build_prompt {
|
|||||||
PS1="${PS1}${reset}${break}${finally}"
|
PS1="${PS1}${reset}${break}${finally}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PS2="${yellow}→${reset} "
|
||||||
|
|
||||||
PROMPT_COMMAND=build_prompt
|
PROMPT_COMMAND=build_prompt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user