summaryrefslogtreecommitdiffstats
path: root/common/commandline/zsh.nix
diff options
context:
space:
mode:
Diffstat (limited to 'common/commandline/zsh.nix')
-rw-r--r--common/commandline/zsh.nix30
1 files changed, 6 insertions, 24 deletions
diff --git a/common/commandline/zsh.nix b/common/commandline/zsh.nix
index f2a052b..8f818dc 100644
--- a/common/commandline/zsh.nix
+++ b/common/commandline/zsh.nix
@@ -13,14 +13,11 @@ in
13 programs.zsh = { 13 programs.zsh = {
14 enable = true; 14 enable = true;
15 15
16 interactiveShellInit = '' 16 interactiveShellInit = lib.mkBefore ''
17 # Use cache file as is, to speed-up start time 17 # Use cache file as is, to speed-up start time
18 # This does mean we have to run once in a while: 18 # This does mean we have to run once in a while:
19 # compinit -d .config/zsh/.zcompdump 19 # compinit -d .config/zsh/.zcompdump
20 zstyle ':grml:completion:compinit' arguments -C 20 autoload -U compinit && compinit -C
21
22 source "${pkgs.grml-zsh-config}/etc/zsh/zshrc"
23 is4 && xsource "${pkgs.grml-zsh-config}/etc/zsh/keephack"
24 21
25 source "${pkgs.zsh-history-substring-search}/share/zsh-history-substring-search/zsh-history-substring-search.zsh" 22 source "${pkgs.zsh-history-substring-search}/share/zsh-history-substring-search/zsh-history-substring-search.zsh"
26 23
@@ -29,22 +26,14 @@ in
29 local dim_fg_escape_code="${fgEscapeCode config.theme.colors.dimForeground}" 26 local dim_fg_escape_code="${fgEscapeCode config.theme.colors.dimForeground}"
30 27
31 ${builtins.readFile ../../dotfiles/zshrc} 28 ${builtins.readFile ../../dotfiles/zshrc}
32
33 autoload -Uz shmart-prompt-dir
34 zstyle -e ':prompt:grml*:*:items:path' token shmart-prompt-dir
35 }
36
37 # Grml's ZSH config overrides less variables
38 export ${
39 lib.concatStringsSep " " (
40 lib.mapAttrsToList (variable: value: "${variable}=\"${value}\"") config.programs.less.envVariables
41 )
42 } 29 }
43 ''; 30 '';
44 31
45 # otherwise it'll override the grml prompt 32 # not needed, since we're using starship
46 promptInit = ""; 33 promptInit = "";
47 # Grml handles that, and supports cache (faster!!!) 34 # Use cache file as is, to speed-up start time
35 # This does mean we have to run once in a while:
36 # compinit -d .config/zsh/.zcompdump
48 enableGlobalCompInit = false; 37 enableGlobalCompInit = false;
49 38
50 syntaxHighlighting = { 39 syntaxHighlighting = {
@@ -94,13 +83,6 @@ in
94 dotDir = ".config/zsh"; 83 dotDir = ".config/zsh";
95 history.path = "${config.xdg.dataHome}/zsh/zsh_history"; 84 history.path = "${config.xdg.dataHome}/zsh/zsh_history";
96 85
97 plugins = [
98 {
99 name = "shmart-prompt-dir";
100 src = inputs.shmart-prompt-dir;
101 file = "none";
102 }
103 ];
104 }; 86 };
105 } 87 }
106 ) 88 )