From c2c0d4fc0450f9c8d93a05634bd2cc5ab4a034cf Mon Sep 17 00:00:00 2001 From: druckdev Date: Sat, 29 Jan 2022 23:34:55 +0100 Subject: [PATCH] zsh:funcs:crypt-*mount: Test for `block special` --- .config/zsh/zshrc.d/40-functions.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/zsh/zshrc.d/40-functions.zsh b/.config/zsh/zshrc.d/40-functions.zsh index f0519e1..5e6e8f9 100644 --- a/.config/zsh/zshrc.d/40-functions.zsh +++ b/.config/zsh/zshrc.d/40-functions.zsh @@ -255,7 +255,7 @@ safe-remove() { crypt-mount() { emulate -L zsh -o err_return [[ $# -gt 0 ]] - [[ -e "$1" ]] + [[ -b "$1" ]] local name=crypt_"${1##*/}" sudo cryptsetup open "$1" "$name" @@ -271,7 +271,7 @@ crypt-mount() { crypt-umount() { emulate -L zsh -o err_return [[ $# -gt 0 ]] - [[ -e "$1" ]] + [[ -b "$1" ]] sync