From 0d3467eeea55e66ca10540ea48aeadfdcf4ba56d Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Fri, 29 Mar 2024 12:48:46 +0100 Subject: [PATCH] Update pblog script. --- home-manager/modules/scripts/pblog | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/home-manager/modules/scripts/pblog b/home-manager/modules/scripts/pblog index 3f41253..c43b29b 100755 --- a/home-manager/modules/scripts/pblog +++ b/home-manager/modules/scripts/pblog @@ -20,16 +20,15 @@ remove_file() { fi } -if [ $# -ne 2 ]; then +if [ $# -eq 1 ]; then + open_file "$1" + exit 0 +elif [ $# -ne 2 ]; then echo "You need to provide action and file name." exit 1 fi case "$1" in -edit) - open_file "$2" - exit 0 - ;; rm) remove_file "$2" exit 0