Experimeting with two lines prompt to avoid https://lists.gnu.org/archive/html/bug-bash/2020-01/msg00003.html.
This commit is contained in:
parent
3964150970
commit
0d8047c341
7
.bashrc
7
.bashrc
|
@ -55,14 +55,11 @@ WHITE=$'\E[00m'
|
|||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
|
||||
|
||||
[ "$TERM" != 'linux' -a z"$TERM" != z'eterm-color' ] && TITLE="\[\033]0;\H\a\]" || TITLE=''
|
||||
export PS1="$TITLE\[$USERNAME_COLOR\]\u\[$WHITE\]@\[$HOSTNAME_COLOR\]\H\[$WHITE\]"
|
||||
|
||||
if ! [ -f "$HOME/.git-prompt.sh" ]
|
||||
then
|
||||
wget -q -O "$HOME/.git-prompt.sh" https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
|
||||
fi
|
||||
export PS1="$PS1"'$(__git_ps1 " (%s)")\$ '
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
alias fingerprint='find /etc/ssh -name "*.pub" -exec ssh-keygen -l -f {} \;'
|
||||
|
@ -79,6 +76,10 @@ do
|
|||
fi
|
||||
done
|
||||
|
||||
[ "$TERM" != 'linux' -a z"$TERM" != z'eterm-color' ] && TITLE="\[\033]0;\H\a\]" || TITLE=''
|
||||
PREV_FAIL="\`PREV_FAIL=\$?; if [ \$PREV_FAIL != 0 ]; then echo \[\e[31m\]\$PREV_FAIL \[\e[0m\]; fi\`"
|
||||
PS1="$TITLE$PREV_FAIL\[$USERNAME_COLOR\]\u\[$WHITE\]@\[$HOSTNAME_COLOR\]\H\[$WHITE\]:\[\033[32m\]\w\[$WHITE\]"'$(__git_ps1 " (%s)")\n\$ '
|
||||
|
||||
jsonpp()
|
||||
{
|
||||
input="$([ $# -gt 0 ] && printf "%s\n" "$*" || cat -)"
|
||||
|
|
Loading…
Reference in New Issue