summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/settings/zsh.nix38
1 files changed, 21 insertions, 17 deletions
diff --git a/user/settings/zsh.nix b/user/settings/zsh.nix
index 6e34a5a0..d7c8c0d4 100644
--- a/user/settings/zsh.nix
+++ b/user/settings/zsh.nix
@@ -30,12 +30,13 @@ in
     zsh-completions
   ];
 
-  home.activation.linkOldZshHistory = config.lib.dag.entryAfter ["writeBoundary"] ''
-    if [[ ! -f ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/history ]]; then
-      mkdir -p ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/
-      ln ~/.cache/zsh/history ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/history
-    fi
-  '';
+  home.activation.linkOldZshHistory =
+    config.lib.dag.entryAfter [ "writeBoundary" ] ''
+      if [[ ! -f ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/history ]]; then
+        mkdir -p ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/
+        ln ~/.cache/zsh/history ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/history
+      fi
+    '';
 
   programs.zsh = {
     enable = true;
@@ -135,13 +136,13 @@ in
 
     shellAliases = {
       l = "ls ${lsOptions} -Bp";
-      l1="ls -1";
-      ls="ls ${lsOptions} -hF";
-      la="ls ${lsOptions} -hA";
-      ll="ls ${lsOptions} ${lsIsoDate} -hl";
-      lal="ll -A";
-      lla="lal";
-      llr="ll -t";
+      l1 = "ls -1";
+      ls = "ls ${lsOptions} -hF";
+      la = "ls ${lsOptions} -hA";
+      ll = "ls ${lsOptions} ${lsIsoDate} -hl";
+      lal = "ll -A";
+      lla = "lal";
+      llr = "ll -t";
 
       cg = "cd-gitroot";
       cdg = "cd-gitroot";
@@ -149,8 +150,10 @@ in
       https = "http --default-scheme https";
 
       history = "fc -l $(( $LINES - 2 ))";
-      hist-freq-lines = "fc -l -10000 | cut -d' ' -f4- | sort | uniq -c | sort -g | tail -n100 | less";
-      hist-freq-commands = "fc -l -10000 | cut -d' ' -f4 | sort | uniq -c | sort -g | tail -n10 | less";
+      hist-freq-lines =
+        "fc -l -10000 | cut -d' ' -f4- | sort | uniq -c | sort -g | tail -n100 | less";
+      hist-freq-commands =
+        "fc -l -10000 | cut -d' ' -f4 | sort | uniq -c | sort -g | tail -n10 | less";
       wprop = "xprop | egrep '^WM_(CLASS|NAME|WINDOW_ROLE|TYPE)'";
 
       # Enable the following commands to support aliases.
@@ -214,7 +217,7 @@ in
       hop = "home-manager packages";
       hol = "home-manager generations";
 
-      nish  = "nix-shell";
+      nish = "nix-shell";
       nic = "nix-channel";
       nica = "nix-channel --add";
       nicl = "nix-channel --list";
@@ -263,5 +266,6 @@ in
     '' + builtins.readFile ../zsh/zshrc;
   };
 
-  home.file."${zshrc}".onChange = "${pkgs.zsh}/bin/zsh -i -c 'autoload -Uz compinit && compinit && zcompile ${zshrc}'";
+  home.file."${zshrc}".onChange =
+    "${pkgs.zsh}/bin/zsh -i -c 'autoload -Uz compinit && compinit && zcompile ${zshrc}'";
 }