From 98fcb1c6ba363790073ba40d054830ce01cc265f Mon Sep 17 00:00:00 2001 From: David Adam Date: Sun, 17 Nov 2024 22:06:54 +0800 Subject: [PATCH] completions/diskutil: list all volumes, not just the writeable ones Discussion in #10574. --- share/completions/diskutil.fish | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/share/completions/diskutil.fish b/share/completions/diskutil.fish index ae09e01d4..43d15959d 100644 --- a/share/completions/diskutil.fish +++ b/share/completions/diskutil.fish @@ -14,11 +14,6 @@ function __fish_diskutil_mounted_volumes printf '%s\n' $mountpoints end -function __fish_diskutil_writeable_volumes - set -l mountpoints (path filter -w /Volumes/*) - printf '%s\n' $mountpoints -end - function __fish_diskutil_using_not_subcommand not __fish_seen_subcommand_from apfs and not __fish_seen_subcommand_from appleRAID @@ -58,7 +53,7 @@ complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand umountDisk' -a # eject complete -f -c diskutil -n __fish_use_subcommand -a eject -d 'Eject a volume or disk' -complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand eject' -a '(__fish_diskutil_writeable_volumes ; __fish_diskutil_devices)' +complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand eject' -a '(__fish_diskutil_volumes ; __fish_diskutil_devices)' # mount complete -f -c diskutil -n __fish_use_subcommand -a mount -d 'Mount a single volume'