fish-shell/share/functions/__fish_print_filesystems.fish
Alan Somers ad6ea1691e Fix "mount -t" completions on non-Linux OSes
AFAICT Linux alone uses the "mount.XXX" convention for mount helpers.
Illumos, Irix, HPUX, OSX, and the BSDs all use "mount_XXX".

Fixes issue #3841
2017-02-12 18:05:37 -08:00

10 lines
564 B
Fish

function __fish_print_filesystems -d "Print a list of all known filesystem types"
set -l fs adfs affs autofs coda coherent cramfs devpts efs ext ext2 ext3
set fs $fs hfs hpfs iso9660 jfs minix msdos ncpfs nfs ntfs proc qnx4 ramfs
set fs $fs reiserfs romfs smbfs sysv tmpfs udf ufs umsdos vfat xenix xfs xiafs
# Mount has helper binaries to mount filesystems
# These are called mount.* and are placed somewhere in $PATH
set -l mountfs $PATH/mount.* $PATH/mount_*
printf '%s\n' $fs (string replace -ra '.*/mount[._]' '' -- $mountfs)
end