Skip to content

Commit

Permalink
add eternal history to zsh where already present (#14)
Browse files Browse the repository at this point in the history
* add eternal history to zsh where already present

* correct zsh history settings
  • Loading branch information
gilesknap authored Dec 22, 2024
1 parent 8b82e97 commit 51c0757
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .devcontainer/features/bash-config/config/onCreateCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ cp $CONFIG_STAGING/bash-config-rc $CONFIG_FOLDER
if [[ ! -f $CONFIG_FOLDER/bashrc ]] ; then
cp $CONFIG_STAGING/bashrc $CONFIG_FOLDER
cp $CONFIG_STAGING/inputrc $CONFIG_FOLDER
cp $CONFIG_STAGING/zshrc $CONFIG_FOLDER
fi

# hook in the config to the root account
ln -fs $CONFIG_FOLDER/inputrc /root/.inputrc
echo "source $CONFIG_FOLDER/bashrc" >> /root/.bashrc
echo "source $CONFIG_FOLDER/bashrc" >> /root/.bashrc
echo "source $CONFIG_FOLDER/zshrc" >> /root/.zshrc
15 changes: 15 additions & 0 deletions .devcontainer/features/bash-config/config/zshrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This zshrc will be source from /root/.zshrc upon launch of every terminal
# in a devcontainer that uses the bash-config feature from
# https://github.com/DiamondLightSource/devcontainer-features

# This file is initialized by vscode feature bash-config,
# but you are then free to edit it

# set up eternal history for zsh
HISTCONTROL=ignoreboth:erasedups
HISTSIZE=10000000
SAVEHIST=$HISTSIZE
HISTFILE=$CONFIG_FOLDER/.zsh_eternal_history

# set a theme compatible with vscode terminals
ZSH_THEME="dst"

0 comments on commit 51c0757

Please sign in to comment.