diff options
-rw-r--r-- | .zsh.after/functions.zsh | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/.zsh.after/functions.zsh b/.zsh.after/functions.zsh index c9ea095..f336e50 100644 --- a/.zsh.after/functions.zsh +++ b/.zsh.after/functions.zsh @@ -266,7 +266,7 @@ lopen() { ;; esac ;; - "dvzrv" | "trvlr") + "dvzrv" | "trvlr" | "apu-serve") case $1 in "music") if [ -L "/dev/disk/by-uuid/e0b19c7d-9e90-4117-aea1-7e4b321d9d5a" ]; then @@ -277,7 +277,7 @@ lopen() { sudo cryptsetup luksOpen "/dev/disk/by-id/usb-Seagate_FreeAgent_Go_2GE36KXD-0:0" $1 else echo "Error! Device $1 is not available" - exit 1 + return 1 fi ;; "photos") @@ -289,7 +289,7 @@ lopen() { sudo cryptsetup luksOpen "/dev/disk/by-id/usb-Seagate_FreeAgent_Go_2GE4LCR0-0:0" $1 else echo "Error! Device $1 is not available" - exit 1 + return 1 fi ;; "backup-audio") @@ -299,7 +299,7 @@ lopen() { sudo cryptsetup luksOpen "/dev/disk/by-id/ata-HGST_HTS725050A7E630_TF755AWHHS9S1M" $1 else echo "Error! Device $1 is not available" - exit 1 + return 1 fi ;; "backup") @@ -311,7 +311,7 @@ lopen() { sudo cryptsetup luksOpen "/dev/disk/by-id/usb-ST950042_0ASG_55DFFFFFFFFF-0:0" $1 else echo "Error! Device $1 is not available" - exit 1 + return 1 fi ;; "media") @@ -321,7 +321,7 @@ lopen() { sudo cryptsetup luksOpen "/dev/disk/by-uuid/e5adbc14-732e-43e8-b6e1-febdfe6d1d3c" $1 else echo "Error! Device $1 is not available" - exit 1 + return 1 fi ;; "video") @@ -331,12 +331,12 @@ lopen() { sudo cryptsetup luksOpen "/dev/disk/by-uuid/5ac700be-e168-495b-b133-42064fa101e4" $1 else echo "Error! Device $1 is not available" - exit 1 + return 1 fi ;; *) echo "Error! Device $1 is not available" - exit 1 + return 1 ;; esac esac @@ -351,7 +351,7 @@ lopen() { fi else echo "Error: Device /dev/mapper/$1 is not available." - exit 1 + return 1 fi } @@ -373,6 +373,7 @@ lclose() { fi else echo "/mnt/$1 is not a mountpoint or not mounted." + return 1 fi } |