aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.zsh.after/functions.zsh6
1 files changed, 5 insertions, 1 deletions
diff --git a/.zsh.after/functions.zsh b/.zsh.after/functions.zsh
index 9839658..cf0f86a 100644
--- a/.zsh.after/functions.zsh
+++ b/.zsh.after/functions.zsh
@@ -255,7 +255,11 @@ function lopen () {
;;
esac
esac
- sudo mount /dev/mapper/$1 /mnt/$1
+ if [[ -e "/dev/mapper/$1" ]]; then
+ sudo mount /dev/mapper/$1 /mnt/$1
+ else
+ echo "Device is not available."
+ fi
}
function lclose () {