Skip to content

Commit 51c0757

Browse files
authored
add eternal history to zsh where already present (#14)
* add eternal history to zsh where already present * correct zsh history settings
1 parent 8b82e97 commit 51c0757

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.devcontainer/features/bash-config/config/onCreateCommand.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ cp $CONFIG_STAGING/bash-config-rc $CONFIG_FOLDER
99
if [[ ! -f $CONFIG_FOLDER/bashrc ]] ; then
1010
cp $CONFIG_STAGING/bashrc $CONFIG_FOLDER
1111
cp $CONFIG_STAGING/inputrc $CONFIG_FOLDER
12+
cp $CONFIG_STAGING/zshrc $CONFIG_FOLDER
1213
fi
1314

1415
# hook in the config to the root account
1516
ln -fs $CONFIG_FOLDER/inputrc /root/.inputrc
16-
echo "source $CONFIG_FOLDER/bashrc" >> /root/.bashrc
17+
echo "source $CONFIG_FOLDER/bashrc" >> /root/.bashrc
18+
echo "source $CONFIG_FOLDER/zshrc" >> /root/.zshrc
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This zshrc will be source from /root/.zshrc upon launch of every terminal
2+
# in a devcontainer that uses the bash-config feature from
3+
# https://github.com/DiamondLightSource/devcontainer-features
4+
5+
# This file is initialized by vscode feature bash-config,
6+
# but you are then free to edit it
7+
8+
# set up eternal history for zsh
9+
HISTCONTROL=ignoreboth:erasedups
10+
HISTSIZE=10000000
11+
SAVEHIST=$HISTSIZE
12+
HISTFILE=$CONFIG_FOLDER/.zsh_eternal_history
13+
14+
# set a theme compatible with vscode terminals
15+
ZSH_THEME="dst"

0 commit comments

Comments
 (0)