Skip to content

Commit 690a7ba

Browse files
Update shell.nix
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent 7541848 commit 690a7ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shell.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ pkgs.mkShell {
77
];
88

99
shellHook = ''
10-
# enters the user's preferred shell
11-
$(grep $USER /etc/passwd | sed 's|.*:||g' | tr -d '\n')
10+
# enters the user's preferred shell using a more robust method
11+
$(getent passwd $(id -un) | cut -d: -f7 | tr -d '\n')
1212
1313
# exits after child shell exits
1414
exit

0 commit comments

Comments
 (0)