#!/usr/bin/fish # Unmount ~/notes/enc-logins and report success or failure. set data ~/notes/enc-logins set mount_name enc-logins fusermount -u $data grep $mount_name /proc/mounts >/dev/null set unmounted $status if test $unmounted != 0 Xdialog --title "Logins wiki" --msgbox "Successfully unmounted $data." 0x0 else Xdialog --title "Logins wiki" --msgbox "Unmounting $data failed. Perhaps you still have files open." 0x0 end