From 2034615561a269deb3ab85885aacbf21ea898eaf Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Wed, 3 Feb 2021 21:02:39 +0300 Subject: [PATCH] Add zsh functions for nix stuff --- modules/workspace/zsh.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/workspace/zsh.nix b/modules/workspace/zsh.nix index 2529131..1f73488 100755 --- a/modules/workspace/zsh.nix +++ b/modules/workspace/zsh.nix @@ -47,13 +47,14 @@ } ]; shellAliases = { - "b" = ''nix-build "" --no-out-link -A''; + "b" = "nix build"; "p" = "nix-shell --run zsh -p"; "s" = "nix shell"; - "ss" = "nix shell self#"; + "e" = "nix edit"; "d" = "nix develop"; - "ds" = "nix develop self#"; - "e" = "nix edit self#"; + "r" = "nix run"; + "f" = "nix search"; + "fs" = "nix search self"; "o" = "xdg-open"; "post" = ''curl -F"file=@-" https://0x0.st''; "cat" = "${pkgs.bat}/bin/bat"; @@ -94,7 +95,13 @@ # make sure this plays nicely with any existing preexec preexec_functions+=( notifyosd-preexec ) XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH - + + function ss() { nix shell "self#$1" } + function es() { nix edit "self#$1" } + function bs() { nix build "self#$1" } + function rs() { nix run "self#$1" } + function is() { nix search "self#$1" } + PS1="$PS1 $ " '';