File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 20
20
git
21
21
chromium
22
22
bash-completion
23
+ ncurses # Provides the 'tput' command
23
24
] ;
24
25
25
26
shellHook = ''
27
+ # Point Puppeteer to the Nix-provided Chromium
26
28
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
27
29
export PUPPETEER_EXECUTABLE_PATH="${ pkgs . chromium } /bin/chromium"
28
30
29
- # Set a nice, readable prompt for the Nix shell
30
- # This is the corrected version.
31
- export PS1="\\[\\033[01;32m\\][nix-dev]\\[\\033[00m\\] \\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ "
31
+ # Set a nice, readable prompt using tput for portability
32
+ # This is the robust way to set colors.
33
+ if command -v tput >/dev/null && tput setaf 1 >/dev/null; then
34
+ green=$(tput setaf 2)
35
+ blue=$(tput setaf 4)
36
+ reset=$(tput sgr0)
37
+ export PS1="$green[nix-dev]$reset $blue\w$reset$ "
38
+ else
39
+ export PS1='[nix-dev] \w\$ '
40
+ fi
32
41
33
42
echo ""
34
43
echo "----------------------------------------------------"
You can’t perform that action at this time.
0 commit comments