From 9c5e6cfa5f653e08702823210adf76dde0f027df Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Fri, 30 Oct 2020 12:22:04 +0100 Subject: [PATCH] Add cockpit function, make variable local, remove output in checkupdates condition --- dotfiles/shell/aliases | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dotfiles/shell/aliases b/dotfiles/shell/aliases index a02a77d..b5e00df 100644 --- a/dotfiles/shell/aliases +++ b/dotfiles/shell/aliases @@ -50,13 +50,19 @@ clitip() { GIT_REPOS=(~/SetupCockpit ~/Keepass ~/Lessons/* ~/PersonalScripts ~/RootMe ~/SRC/*) +cockpit() { # enable pass-like commands (ex: cockpit git push) + local start_dir="$PWD" + cd ~/SetupCockpit && "$@" + cd "$start_dir" && echo 'done' +} + hello() { - start_dir="$PWD" + local start_dir="$PWD" sudo protonvpn c -f echo # Don't update if its a kernel update that will require reboot - if checkupdates | grep linux; then - case "$(checkupdates | grep linux)" in + if checkupdates >/dev/null 2>&1; then + case "$(checkupdates | grep linux && echo)" in *linux*) echo "Not performing update" ;;