Merge pull request #294 from dyne/regex-match

drop zsh/regex module in favor of =~
This commit is contained in:
Jaromil 2018-01-02 13:23:23 +01:00 committed by GitHub
commit 742b097192
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
tomb
View File

@ -65,7 +65,6 @@ WIPE=(rm -f)
PINENTRY=(pinentry)
# load zsh regex module
zmodload zsh/regex
zmodload zsh/mapfile
zmodload -F zsh/stat b:zstat
@ -2680,7 +2679,7 @@ umount_tomb() {
tombname_regex=${tombname//\[/}
tombname_regex=${tombname_regex//\]/}
[[ "$tombmount" -regex-match "[/run]?/media[/$_USER]?/$tombname_regex" ]] && {
[[ "$tombmount" =~ "(/run)?/media(/$_USER)?/$tombname_regex" ]] && {
_sudo rmdir $tombmount }
_sudo cryptsetup luksClose $mapper ||