.bashrc: add persistent history and fix PROMPT_COMMAND
parent
adcefe76ce
commit
660fcdfd80
9
.bashrc
9
.bashrc
|
@ -18,6 +18,13 @@ alias ll="ls -AF1"
|
||||||
alias lll="ls -AFlh"
|
alias lll="ls -AFlh"
|
||||||
alias ff="find 2>/dev/null"
|
alias ff="find 2>/dev/null"
|
||||||
|
|
||||||
|
# history
|
||||||
|
HISTCONTROL="ignoreboth:erasedups"
|
||||||
|
HISTFILESIZE="-1"
|
||||||
|
HISTIGNORE="q"
|
||||||
|
shopt -s histappend
|
||||||
|
PROMPT_COMMAND=${PROMPT_COMMAND:+${PROMPT_COMMAND%;}; }"history -a; history -c; history -r;"
|
||||||
|
|
||||||
# bash completion
|
# bash completion
|
||||||
if ! shopt -oq posix; then
|
if ! shopt -oq posix; then
|
||||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
@ -42,4 +49,4 @@ osc7_cwd() {
|
||||||
done
|
done
|
||||||
printf '\e]7;file://%s%s\e\\' "${HOSTNAME}" "${encoded}"
|
printf '\e]7;file://%s%s\e\\' "${HOSTNAME}" "${encoded}"
|
||||||
}
|
}
|
||||||
PROMPT_COMMAND="osc7_cwd; $PROMPT_COMMAND"
|
PROMPT_COMMAND=${PROMPT_COMMAND:+${PROMPT_COMMAND%;}; }osc7_cwd
|
||||||
|
|
Loading…
Reference in New Issue