From 419e4d201ed661027243d4330439a9f0d5e37d21 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 5 Oct 2019 22:17:05 +0200 Subject: zsh: move current aliases to home-manager --- user/modules/zsh.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'user/modules/zsh.nix') 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 -- cgit 1.4.1