diff options
author | pacien | 2023-08-25 02:50:26 +0200 |
---|---|---|
committer | pacien | 2023-08-25 02:50:26 +0200 |
commit | df789547acc0a9f5f3f4bf93a6e6a9cf9877d74b (patch) | |
tree | 2d74da727161d4478e7bfc5db7083e5a41a7a0af /lib | |
parent | af8238782fd0408b0f5c81cd3d0e4690373ea347 (diff) | |
download | flaky-utils-df789547acc0a9f5f3f4bf93a6e6a9cf9877d74b.tar.gz |
devshell: add prePrompt option
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mk-dev-shell.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/mk-dev-shell.nix b/lib/mk-dev-shell.nix index fe2ac02..cc7d940 100644 --- a/lib/mk-dev-shell.nix +++ b/lib/mk-dev-shell.nix | |||
@@ -2,6 +2,7 @@ flake: | |||
2 | { pkgs | 2 | { pkgs |
3 | , tools ? [] | 3 | , tools ? [] |
4 | , envVars ? {} | 4 | , envVars ? {} |
5 | , prePrompt ? "" | ||
5 | , shell ? null | 6 | , shell ? null |
6 | }: | 7 | }: |
7 | 8 | ||
@@ -16,6 +17,7 @@ in pkgs.mkShell { | |||
16 | ${shellLib.ifSomeAttrs envVars shellLib.printEnvVars} | 17 | ${shellLib.ifSomeAttrs envVars shellLib.printEnvVars} |
17 | ${shellLib.ifSomeList tools shellLib.printBins} | 18 | ${shellLib.ifSomeList tools shellLib.printBins} |
18 | echo | 19 | echo |
20 | ${prePrompt} | ||
19 | 21 | ||
20 | ${if (shell != null) then shell else shellLib.startUserShell} | 22 | ${if (shell != null) then shell else shellLib.startUserShell} |
21 | exit $? | 23 | exit $? |