From 271f5bcf25deaed34372418715749ed899fbbc90 Mon Sep 17 00:00:00 2001 From: druckdev Date: Sun, 30 Jan 2022 00:37:13 +0100 Subject: [PATCH] zsh:funcs:crypt-*mount: Set `pipe_fail` Set `pipe_fail` so that if for example the `grep` fails while getting `$mount_point`, the function returns early. --- .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 8b2da87..af6268b 100644 --- a/.config/zsh/zshrc.d/40-functions.zsh +++ b/.config/zsh/zshrc.d/40-functions.zsh @@ -253,7 +253,7 @@ safe-remove() { } crypt-mount() { - emulate -L zsh -o err_return + emulate -L zsh -o err_return -o pipe_fail [[ $# -gt 0 ]] [[ -b "$1" ]] @@ -278,7 +278,7 @@ crypt-mount() { } crypt-umount() { - emulate -L zsh -o err_return + emulate -L zsh -o err_return -o pipe_fail [[ $# -gt 0 ]] [[ -b "$1" ]]