Skip to content

Commit 5c161a8

Browse files
committed
chore: nix: Improve dev shell
Add history and color prompt.
1 parent b352ab5 commit 5c161a8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

flake.nix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,21 @@
2020
git
2121
chromium
2222
bash-completion
23-
ncurses # Provides the 'tput' command
23+
ncurses # Provides 'tput' for colors
2424
];
2525

2626
shellHook = ''
2727
# Point Puppeteer to the Nix-provided Chromium
2828
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
2929
export PUPPETEER_EXECUTABLE_PATH="${pkgs.chromium}/bin/chromium"
3030
31+
# Enable history and other interactive features
32+
set -o vi # or set -o emacs for emacs keybindings
33+
HISTFILE=~/.bash_history_nix_dev
34+
history -c
35+
history -r
36+
3137
# Set a nice, readable prompt using tput for portability
32-
# This is the robust way to set colors.
3338
if command -v tput >/dev/null && tput setaf 1 >/dev/null; then
3439
green=$(tput setaf 2)
3540
blue=$(tput setaf 4)

0 commit comments

Comments
 (0)