Skip to content

Commit

Permalink
fix history using PROMPT_COMMAND
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Nov 28, 2024
1 parent 921c2d6 commit 68aa0d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .devcontainer/features/bash-config/config/bash-config-rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

# default opinioned bash configuration

# set the prompt
export PS1="\[\033[1;34m\]\W \[\033[0m\]# "

# enable enternal shared history
export HISTCONTROL=ignoreboth:erasedups
export HISTSIZE=-1
export HISTFILESIZE=-1
export SAVEHIST=-1
export HISTFILE=$CONFIG_FOLDER/.bash_eternal_history
export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"

# bash theme - partly inspired by https://github.com/ohmyzsh/ohmyzsh/blob/master/themes/robbyrussell.zsh-theme
# from https://github.com/devcontainers/features/blob/main/src/common-utils/scripts/bash_theme_snippet.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ if [[ ! -f $CONFIG_FOLDER/bashrc ]] ; then
fi

# hook in the config to the root account
ln -s $CONFIG_FOLDER/inputrc /root/.inputrc
ln -fs $CONFIG_FOLDER/inputrc /root/.inputrc
echo "source $CONFIG_FOLDER/bashrc" >> /root/.bashrc

0 comments on commit 68aa0d6

Please sign in to comment.