From 8a920b5b1c1ac96b3e88f2dcf2f12396b1eec69e Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Thu, 1 Nov 2018 22:46:08 +0100 Subject: [PATCH] Added wrapper function for yay (no default action) --- .bashrc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.bashrc b/.bashrc index 26ee230..4ab8425 100644 --- a/.bashrc +++ b/.bashrc @@ -91,6 +91,17 @@ calc() # Create and cd to tmp dir alias cdtmp='cd $(mktemp -d -p ~/tmp/)' +# yay without parameters does "pacman -Syu" but I don't it to do this +yay() { + if [ $# -eq 0 ]; then + echo "error: no operation specified (use -h for help)" + return 1 + else + command yay "$@" + fi +} + + # Bash prompt PS1='[\u@\h \W]\$ '