From a24212e200da85e91c20d3f7c6631a19b4bab04f Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 16 Aug 2016 16:04:50 +0200 Subject: .zsh.after/functions.zsh: Extending lopen function for apu-serve. Changing exits into returns. --- .zsh.after/functions.zsh | 19 ++++++++++--------- 1 file 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 } -- cgit v1.2.3-70-g09d2