about summary refs log tree commit diff
path: root/Completion/Unix/Type/_file_systems
blob: 4c08dec01da9e225169fe4962f0d99dc4d583830 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#autoload

local fss

case $OSTYPE in
  aix*) fss=( jfs nfs cdrfs ) ;;
  irix*) fss=( efs proc fd nfs iso9660 dos hfs cachefs xfs ) ;;
  linux*)
    typeset -aU fss
    fss=( adfs bfs cramfs ext2 ext3 hfs hpfs iso9660 minix ntfs qnx4
          reiserfs romfs swap udf ufs vxfs xfs xiafs )
    [[ -r /proc/filesystems ]] &&
        fss=( $fss ${$(</proc/filesystems)#nodev} )
    [[ -r /etc/filesystems ]] &&
        fss=( $fss ${$(</etc/filesystems)#nodev} )
  ;;
  osf*) fss=( advfs ufs nfs mfs cdfs ) ;;
  solaris*) fss=( ufs nfs hsfs s5fs pcfs cachefs tmpfs ) ;;
  freebsd*)
    fss=( cd9660 devfs ext2fs fdesc kernfs linprocfs mfs msdos nfs 
          ntfs null nwfs portal procfs std ufs umap union )
  ;;
  *)
    # default for all other systems
    fss=( ufs)
  ;;
esac

_wanted fstypes expl 'file system type' compadd "$@" -M 'L:|no=' -a fss