From 4623688fa8ba1579cf7a722a3feed2f3773cb665 Mon Sep 17 00:00:00 2001 From: druckdev Date: Sun, 30 Jan 2022 00:12:48 +0100 Subject: [PATCH] zsh:funcs:crypt-umount: Fix typo Remove the basename of `$mount_point` as this is the actual symlink name in `~/mounts/`. --- .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 1d1999a..a6fa094 100644 --- a/.config/zsh/zshrc.d/40-functions.zsh +++ b/.config/zsh/zshrc.d/40-functions.zsh @@ -305,8 +305,8 @@ crypt-umount() { | grep -F /dev/mapper/"$name" \ | awk '{ print $2; }' )" - rm ~/mounts/"$name" && rmdir --ignore-fail-on-non-empty ~/mounts/ \ - || echo "~/mounts/$name did not exist" + rm ~/mounts/"${mount_point:t}" && rmdir --ignore-fail-on-non-empty ~/mounts/ \ + || echo "~/mounts/${mount_point:t} did not exist" } if (( $+commands[trash] )); then