bash: update work profile (merge ubuntu with main)
This commit is contained in:
parent
c2099170a7
commit
4d296eba2a
1 changed files with 18 additions and 3 deletions
|
|
@ -23,16 +23,31 @@ shopt -s histappend
|
||||||
[[ -f $HOME/.bash_colors ]] && source "$HOME/.bash_colors"
|
[[ -f $HOME/.bash_colors ]] && source "$HOME/.bash_colors"
|
||||||
[[ -f $HOME/.bash_functions ]] && source "$HOME/.bash_functions"
|
[[ -f $HOME/.bash_functions ]] && source "$HOME/.bash_functions"
|
||||||
|
|
||||||
|
if ! shopt -oq posix; then
|
||||||
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
elif [ -f /etc/bash_completion ]; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
while read -r completion ; do source "$completion" ; done < <(find $HOME/.bash_completion/*)
|
||||||
|
|
||||||
# Save working dir on every prompt.
|
# Save working dir on every prompt.
|
||||||
# export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"; pwd > $HOME/.cwd'
|
# export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"; pwd > $HOME/.cwd'
|
||||||
export PS1="${Blue}\d \A ${Off}${Yellow}\u@\h: ${Off}\w ${Green}\$(parse_branch git)${BRed}\$(parse_branch fossil)${Off}\n-$ "
|
export PS1="${Blue}\d \A ${Off}${Yellow}\u@\h: ${Off}\w ${Green}\$(parse_branch git)${BRed}\$(parse_branch fossil)${Off}\n-$ "
|
||||||
|
|
||||||
# more is less
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
|
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
# Use fzf if installed.
|
# Use fzf if installed.
|
||||||
hash fzf 2>/dev/null && eval "$(fzf --bash)"
|
export FZF_DEFAULT_OPTS='--border=horizontal --info=inline --no-reverse --height=30%'
|
||||||
export FZF_DEFAULT_OPTS='--border=horizontal --info=inline --no-reverse --height=50%'
|
|
||||||
|
|
||||||
# Use gpg-agent as ssh agent (and get a nice graphical prompt).
|
# Use gpg-agent as ssh agent (and get a nice graphical prompt).
|
||||||
unset SSH_AGENT_PID
|
unset SSH_AGENT_PID
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue