From 534afd0fc19cd7e874147f8cc1432121566f81a1 Mon Sep 17 00:00:00 2001 From: Jens Nolte <jens@nightmarestudio.de> Date: Tue, 7 Apr 2020 14:47:22 +0200 Subject: [PATCH] Add and fix some shell aliases --- nixos/layers/zsh.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/nixos/layers/zsh.nix b/nixos/layers/zsh.nix index 3e6ba5f..3b08cbf 100644 --- a/nixos/layers/zsh.nix +++ b/nixos/layers/zsh.nix @@ -39,6 +39,11 @@ in la = "ls -la"; lah = "ls -lah"; + f = "fd"; + + # tree configured to ignore .gitignore + gtree = "${pkgs.tree}/bin/tree --fromfile <(${pkgs.fd}/bin/fd -H -E .git)"; + nix-zsh = "nix-shell --packages zsh --command \"exec zsh\""; cal = "cal --monday"; @@ -55,7 +60,7 @@ in visual-hostkey = "ssh-keygen -lvf /etc/ssh/ssh_host_ed25519_key.pub"; - starwars="telnet towel.blinkenlights.nl"; + starwars="nix-shell -p telnet --run 'telnet towel.blinkenlights.nl'"; }; environment.shellInit = '' @@ -97,6 +102,16 @@ in eval "$(direnv hook zsh)" fi + nman() { + if [[ -n "$1" ]] + then + nvim "man://$1" + else + nvim "man://$1" + fi + } + + # "The time the shell waits, in hundredths of seconds, for another key to be pressed when reading bound multi-character sequences." # This is for vim-style multi-letter commands (<f><d> is mapped to <Esc>) KEYTIMEOUT=20 -- GitLab