summary refs log tree commit diff stats
path: root/user/modules/zsh.nix
diff options
context:
space:
mode:
authorAlan Pearce2019-10-05 22:17:05 +0200
committerAlan Pearce2019-10-05 22:17:05 +0200
commit419e4d201ed661027243d4330439a9f0d5e37d21 (patch)
treec1782a00c791d30364af9665c8fc8262403b699c /user/modules/zsh.nix
parent67aafba55a3bb3a92520e7694ca16776d219c43a (diff)
downloadnixfiles-419e4d201ed661027243d4330439a9f0d5e37d21.tar.lz
nixfiles-419e4d201ed661027243d4330439a9f0d5e37d21.tar.zst
nixfiles-419e4d201ed661027243d4330439a9f0d5e37d21.zip
zsh: move current aliases to home-manager
Diffstat (limited to 'user/modules/zsh.nix')
-rw-r--r--user/modules/zsh.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/user/modules/zsh.nix b/user/modules/zsh.nix
index adbcaad0..9544f86f 100644
--- a/user/modules/zsh.nix
+++ b/user/modules/zsh.nix
@@ -1,5 +1,10 @@
 { config, pkgs, ... }:
 
+let
+  inherit (pkgs) stdenv;
+  lsOptions = if stdenv.isDarwin then "-p" else "-v --group-directories-first";
+  lsIsoDate = if stdenv.isDarwin then "" else "--time-style=long-iso";
+in
 {
   home.file = {
     ".rm_recycle_home".text = ""; # use trash automatically in home directory
@@ -49,6 +54,34 @@
       ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=7";
     };
 
+    shellAliases = {
+      l = "ls ${lsOptions} -Bp";
+      l1="ls ${lsOptions} -1";
+      ls="ls ${lsOptions} -hF";
+      la="ls ${lsOptions} -hA";
+      ll="ls ${lsOptions} ${lsIsoDate} -hl";
+      lal="ll -A";
+      lla="lal";
+      llr="ll -t";
+
+      https = "http --default-scheme https";
+      kns = "kubens";
+      kx = "kubectx";
+      ava = "pnpx ava";
+      avt = "pnpx ava --tap";
+      avat = "pnpx ava --tap";
+      pino = "pino-pretty";
+      mocha = "pnpx mocha";
+      prettier = "pnpx prettier";
+      standard = "pnpx standard";
+      tsc = "pnpx tsc";
+      tslint = "pnpx tslint";
+      tsnode = "pnpx ts-node";
+      wprop = "xprop | egrep '^WM_(CLASS|NAME|WINDOW_ROLE|TYPE)'";
+
+      watch = "watch "; # enable watch with aliases
+    };
+
     # move to envExtra after 19.09
     initExtra = ''
       case $OSTYPE in