From 5a276c60869365b0a10c46dbcc69fa899c687dd6 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Mon, 16 Dec 2019 16:13:37 -0700 Subject: [PATCH] develop#zsh: i to install pkg --- profiles/develop/zsh/functions/i | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 profiles/develop/zsh/functions/i diff --git a/profiles/develop/zsh/functions/i b/profiles/develop/zsh/functions/i new file mode 100644 index 0000000..3831813 --- /dev/null +++ b/profiles/develop/zsh/functions/i @@ -0,0 +1,12 @@ +RED='\033[0;31m' +NC='\033[0m' + +# needs one arguement or exit +[[ -n $2 || -z $1 ]] && { + print -u2 \ + "${RED}takes one arguement${NC}" + + exit 1 +} + +nix profile install "nixpkgs#$1"