robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

zeertzjqMerge pull request #37886 from zeertzjq/vim-c68e64d777db84ef5

master
30.6 KiB530 linesraw
1" Vim syntax file
2" Language: fstab file
3" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
4" URL: https://raw.github.com/rid9/vim-fstab/master/syntax/fstab.vim
5" Last Change: 2026 Feb 14
6" Version: 1.7.1
7"
8" Credits:
9"   David Necas (Yeti) <yeti@physics.muni.cz>
10"   Stefano Zacchiroli <zack@debian.org>
11"   Georgi Georgiev <chutz@gg3.net>
12"   James Vega <jamessan@debian.org>
13"   Elias Probst <mail@eliasprobst.eu>
14
15" Options:
16"   let fstab_unknown_fs_errors = 1
17"     highlight unknown filesystems as errors
18"
19"   let fstab_unknown_device_errors = 0
20"     do not highlight unknown devices as errors
21"
22" Changelog:
23" - 2025 Aug 21 added support for mtab
24" - 2026 Feb 14 added cgroup2 to device types
25
26" quit when a syntax file was already loaded
27if exists("b:current_syntax")
28	finish
29endif
30
31let s:cpo_save = &cpo
32set cpo&vim
33
34" General
35syn cluster fsGeneralCluster contains=fsComment
36syn match fsComment /\s*#.*/ contains=@Spell
37syn match fsOperator /[,=:#]/
38
39" Device
40syn cluster fsDeviceCluster contains=fsOperator,fsDeviceKeyword,fsDeviceError
41syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@:\.-]\|^\w\{-}\ze\W\)/ contained
42syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts devtmpfs sysfs usbfs tracefs overlay cgroup2
43syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel
44syn keyword fsDeviceKeyword contained UUID nextgroup=fsDeviceUUID
45syn keyword fsDeviceKeyword contained PARTLABEL nextgroup=fsDevicePARTLABEL
46syn keyword fsDeviceKeyword contained PARTUUID nextgroup=fsDevicePARTUUID
47syn keyword fsDeviceKeyword contained sshfs nextgroup=fsDeviceSshfs
48syn match fsDeviceKeyword contained /^[a-zA-Z0-9.\-]\+\ze:/
49syn match fsDeviceLabel contained /=[^ \t]\+/hs=s+1 contains=fsOperator
50syn match fsDeviceUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator
51syn match fsDevicePARTLABEL contained /=[^ \t]\+/hs=s+1 contains=fsOperator
52syn match fsDevicePARTUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator
53syn match fsDeviceSshfs contained /#[_=[:alnum:]\.\/+-]\+@[a-z0-9._-]\+\a\{2}:[^ \t]\+/hs=s+1 contains=fsOperator
54
55" Mount Point
56syn cluster fsMountPointCluster contains=fsMountPointKeyword,fsMountPointError
57syn match fsMountPointError /\%([^ \ta-zA-Z0-9_\/#@\.-]\|\s\+\zs\w\{-}\ze\s\)/ contained
58syn keyword fsMountPointKeyword contained none swap
59
60" Type
61syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown
62syn match fsTypeUnknown /\s\+\zs\w\+/ contained
63syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 ceph cfs cgroup cifs coda coherent configfs cpuset cramfs debugfs devfs devpts devtmpfs dlmfs e2compr ecryptfs efivarfs efs erofs exfat ext2 ext2fs ext3 ext4 f2fs fdesc ffs filecore fuse fuseblk fusectl gfs2 hfs hfsplus hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfs4 nfsd nilfs2 none ntfs ntfs3 null nwfs ocfs2 omfs overlay ovlfs pipefs portal proc procfs pstore ptyfs pvfs2 qnx4 qnx6 reiserfs ramfs romfs rpc_pipefs securityfs shm smbfs spufs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs tracefs ubifs udf ufs umap umsdos union usbfs userfs v9fs vfat virtiofs vs3fs vxfs wrapfs wvfs xenfs xenix xfs zisofs zonefs
64
65" Options
66" -------
67" Options: General
68syn cluster fsOptionsCluster contains=fsOperator,fsOptionsGeneral,fsOptionsKeywords,fsTypeUnknown
69syn match fsOptionsNumber /\d\+/
70syn match fsOptionsNumberSigned /[-+]\?\d\+/
71syn match fsOptionsNumberOctal /[0-8]\+/
72syn match fsOptionsString /[a-zA-Z0-9_-]\+/
73syn keyword fsOptionsTrueFalse true false
74syn keyword fsOptionsYesNo yes no
75syn keyword fsOptionsYN y n
76syn keyword fsOptions01 0 1
77syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck
78syn keyword fsOptionsSize 512 1024 2048
79syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop managed mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner pamconsole rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail failok lazytime
80syn match fsOptionsGeneral /_netdev/
81
82syn match fsOptionsKeywords contained /\<x-systemd\.\%(requires\|before\|after\|wanted-by\|required-by\|requires-mounts-for\|idle-timeout\|device-timeout\|mount-timeout\)=/ nextgroup=fsOptionsString
83syn match fsOptionsKeywords contained /\<x-systemd\.\%(device-bound\|automount\|makefs\|growfs\|rw-only\)/
84syn match fsOptionsKeywords contained /\<x-initrd\.mount/
85
86syn match fsOptionsKeywords contained /\<cache=/ nextgroup=fsOptionsCache
87syn keyword fsOptionsCache contained yes no none strict loose fscache mmap
88
89syn match fsOptionsKeywords contained /\<dax=/ nextgroup=fsOptionsDax
90syn keyword fsOptionsDax contained inode never always
91
92syn match fsOptionsKeywords contained /\<errors=/ nextgroup=fsOptionsErrors
93syn keyword fsOptionsErrors contained continue panic withdraw remount-ro recover zone-ro zone-offline repair
94
95syn match fsOptionsKeywords contained /\<\%(sec\)=/ nextgroup=fsOptionsSecurityMode
96syn keyword fsOptionsSecurityMode contained none krb5 krb5i ntlm ntlmi ntlmv2 ntlmv2i ntlmssp ntlmsspi sys lkey lkeyi lkeyp spkm spkmi spkmp
97
98" Options: adfs
99syn match fsOptionsKeywords contained /\<\%([ug]id\|o\%(wn\|th\)mask\)=/ nextgroup=fsOptionsNumber
100syn match fsOptionsKeywords contained /\<ftsuffix=/ nextgroup=fsOptions01
101
102" Options: affs
103syn match fsOptionsKeywords contained /\<mode=/ nextgroup=fsOptionsString
104syn match fsOptionsKeywords contained /\<\%(set[ug]id\|reserved\)=/ nextgroup=fsOptionsNumber
105syn match fsOptionsKeywords contained /\<\%(prefix\|volume\|root\)=/ nextgroup=fsOptionsString
106syn match fsOptionsKeywords contained /\<bs=/ nextgroup=fsOptionsSize
107syn keyword fsOptionsKeywords contained protect usemp verbose nofilenametruncate mufs
108
109" Options: btrfs
110syn match fsOptionsKeywords contained /\<\%(subvol\|subvolid\|subvolrootid\|device\|compress\|compress-force\|check_int_print_mask\|space_cache\)=/ nextgroup=fsOptionsString
111syn match fsOptionsKeywords contained /\<\%(max_inline\|alloc_start\|thread_pool\|metadata_ratio\|check_int_print_mask\)=/ nextgroup=fsOptionsNumber
112syn match fsOptionsKeywords contained /\<discard=/ nextgroup=fsOptionsBtrfsDiscard
113syn keyword fsOptionsBtrfsDiscard sync async
114syn match fsOptionsKeywords contained /\<fatal_errors=/ nextgroup=fsOptionsBtrfsFatalErrors
115syn keyword fsOptionsBtrfsFatalErrors bug panic
116syn match fsOptionsKeywords contained /\<fragment=/ nextgroup=fsOptionsBtrfsFragment
117syn keyword fsOptionsBtrfsFragment data metadata all
118syn keyword fsOptionsKeywords contained degraded datasum nodatasum datacow nodatacow barrier nobarrier ssd ssd_spread nossd nossd_spread noacl treelog notreelog flushoncommit noflushoncommit space_cache nospace_cache clear_cache user_subvol_rm_allowed autodefrag noautodefrag inode_cache noinode_cache enospc_debug noenospc_debug recovery check_int check_int_data skip_balance discard nodiscard compress compress-force nologreplay rescan_uuid_tree rescue usebackuproot
119
120" Options: cd9660
121syn keyword fsOptionsKeywords contained extatt gens norrip nostrictjoilet
122
123" Options: ceph
124syn match fsOptionsKeywords contained /\<\%(mon_addr\|fsid\|rasize\|mount_timeout\|caps_max\)=/ nextgroup=fsOptionsString
125syn keyword fsOptionsKeywords contained rbytes norbytes nocrc dcache nodcache noasyncreaddir noquotadf nocopyfrom
126syn match fsOptionsKeywords contained /\<recover_session=/ nextgroup=fsOptionsCephRecoverSession
127syn keyword fsOptionsCephRecoverSession contained no clean
128
129" Options: cifs
130syn match fsOptionsKeywords contained /\<\%(user\|password\|credentials\|servernetbiosname\|servern\|netbiosname\|file_mode\|dir_mode\|ip\|domain\|prefixpath\)=/ nextgroup=fsOptionsString
131syn match fsOptionsKeywords contained /\<\%(cruid\|backupuid\|backupgid\)=/ nextgroup=fsOptionsNumber
132syn keyword fsOptionsKeywords contained forceuid forcegid guest setuids nosetuids perm noperm dynperm strictcache rwpidforward mapchars nomapchars cifsacl nocase ignorecase nobrl sfu serverino noserverino nounix fsc multiuser posixpaths noposixpaths
133
134" Options: devpts
135" -- everything already defined
136
137" Options: ecryptfs
138syn match fsOptionsKeywords contained /\<\%(ecryptfs_\%(sig\|fnek_sig\|cipher\|key_bytes\)\|key\)=/ nextgroup=fsOptionsString
139syn keyword fsOptionsKeywords contained ecryptfs_passthrough no_sig_cache ecryptfs_encrypted_view ecryptfs_xattr
140syn match fsOptionsKeywords contained /\<ecryptfs_enable_filename_crypto=/ nextgroup=fsOptionsYN
141syn match fsOptionsKeywords contained /\<verbosity=/ nextgroup=fsOptions01
142
143" Options: erofs
144syn match fsOptionsKeywords contained /\<cache_strategy=/ nextgroup=fsOptionsEroCacheStrategy
145syn keyword fsOptionsEroCacheStrategy contained disabled readahead readaround
146
147" Options: ext2
148syn match fsOptionsKeywords contained /\<check=*/ nextgroup=@fsOptionsCheckCluster
149syn match fsOptionsKeywords contained /\<\%(res[gu]id\|sb\)=/ nextgroup=fsOptionsNumber
150syn keyword fsOptionsExt2Check contained none normal strict
151syn match fsOptionsErrors contained /\<remount-ro\>/
152syn keyword fsOptionsKeywords contained acl bsddf minixdf debug grpid bsdgroups minixdf nocheck nogrpid oldalloc orlov sysvgroups nouid32 nobh user_xattr nouser_xattr
153
154" Options: ext3
155syn match fsOptionsKeywords contained /\<journal=/ nextgroup=fsOptionsExt3Journal
156syn match fsOptionsKeywords contained /\<data=/ nextgroup=fsOptionsExt3Data
157syn match fsOptionsKeywords contained /\<data_err=/ nextgroup=fsOptionsExt3DataErr
158syn match fsOptionsKeywords contained /\<commit=/ nextgroup=fsOptionsNumber
159syn match fsOptionsKeywords contained /\<jqfmt=/ nextgroup=fsOptionsExt3Jqfmt
160syn match fsOptionsKeywords contained /\<\%(usrjquota\|grpjquota\)=/ nextgroup=fsOptionsString
161syn keyword fsOptionsExt3Journal contained update inum
162syn keyword fsOptionsExt3Data contained journal ordered writeback
163syn keyword fsOptionsExt3DataErr contained ignore abort
164syn keyword fsOptionsExt3Jqfmt contained vfsold vfsv0 vfsv1
165syn keyword fsOptionsKeywords contained noload user_xattr nouser_xattr acl
166
167" Options: ext4
168syn match fsOptionsKeywords contained /\<journal=/ nextgroup=fsOptionsExt4Journal
169syn match fsOptionsKeywords contained /\<data=/ nextgroup=fsOptionsExt4Data
170syn match fsOptionsKeywords contained /\<barrier=/ nextgroup=fsOptions01
171syn match fsOptionsKeywords contained /\<journal_dev=/ nextgroup=fsOptionsNumber
172syn match fsOptionsKeywords contained /\<resuid=/ nextgroup=fsOptionsNumber
173syn match fsOptionsKeywords contained /\<resgid=/ nextgroup=fsOptionsNumber
174syn match fsOptionsKeywords contained /\<sb=/ nextgroup=fsOptionsNumber
175syn match fsOptionsKeywords contained /\<\%(commit\|inode_readahead_blks\|stripe\|max_batch_time\|min_batch_time\|init_itable\|max_dir_size_kb\)=/ nextgroup=fsOptionsNumber
176syn match fsOptionsKeywords contained /\<journal_ioprio=/ nextgroup=fsOptionsExt4JournalIoprio
177syn keyword fsOptionsExt4Journal contained update inum
178syn keyword fsOptionsExt4Data contained journal ordered writeback
179syn keyword fsOptionsExt4JournalIoprio contained 0 1 2 3 4 5 6 7
180syn keyword fsOptionsKeywords contained noload extents orlov oldalloc user_xattr nouser_xattr acl noacl reservation noreservation bsddf minixdf check=none nocheck debug grpid nogroupid sysvgroups bsdgroups quota noquota grpquota usrquota bh nobh journal_checksum nojournal_checksum journal_async_commit delalloc nodelalloc auto_da_alloc noauto_da_alloc noinit_itable block_validity noblock_validity dioread_lock dioread_nolock i_version nombcache prjquota
181
182" Options: fat
183syn match fsOptionsKeywords contained /\<blocksize=/ nextgroup=fsOptionsSize
184syn match fsOptionsKeywords contained /\<\%([dfu]mask\|codepage\)=/ nextgroup=fsOptionsNumberOctal
185syn match fsOptionsKeywords contained /\%(cvf_\%(format\|option\)\|iocharset\)=/ nextgroup=fsOptionsString
186syn match fsOptionsKeywords contained /\<check=/ nextgroup=@fsOptionsCheckCluster
187syn match fsOptionsKeywords contained /\<conv=*/ nextgroup=fsOptionsConv
188syn match fsOptionsKeywords contained /\<fat=/ nextgroup=fsOptionsFatType
189syn match fsOptionsKeywords contained /\<dotsOK=/ nextgroup=fsOptionsYesNo
190syn keyword fsOptionsFatCheck contained r n s relaxed normal strict
191syn keyword fsOptionsConv contained b t a binary text auto
192syn keyword fsOptionsFatType contained 12 16 32
193syn keyword fsOptionsKeywords contained quiet sys_immutable showexec dots nodots
194
195" Options: fuse
196syn match fsOptionsKeywords contained /\<\%(fd\|user_id\|group_id\|blksize\)=/ nextgroup=fsOptionsNumber
197syn match fsOptionsKeywords contained /\<\%(rootmode\)=/ nextgroup=fsOptionsString
198
199" Options: hfs
200syn match fsOptionsKeywords contained /\<\%(creator\|type\)=/ nextgroup=fsOptionsString
201syn match fsOptionsKeywords contained /\<\%(dir\|file\|\)_umask=/ nextgroup=fsOptionsNumberOctal
202syn match fsOptionsKeywords contained /\<\%(session\|part\)=/ nextgroup=fsOptionsNumber
203
204" Options: hfsplus
205syn match fsOptionsKeywords contained /\<nls=/ nextgroup=fsOptionsString
206syn keyword fsOptionsKeywords contained decompose nodecompose
207
208" Options: f2fs
209syn match fsOptionsKeywords contained /\<background_gc=/ nextgroup=fsOptionsF2fsBackgroundGc
210syn keyword fsOptionsF2fsBackgroundGc contained on off sync
211syn match fsOptionsKeywords contained /\<active_logs=/ nextgroup=fsOptionsF2fsActiveLogs
212syn keyword fsOptionsF2fsActiveLogs contained 2 4 6
213syn match fsOptionsKeywords contained /\<alloc_mode=/ nextgroup=fsOptionsF2fsAllocMode
214syn keyword fsOptionsF2fsAllocMode contained reuse default
215syn match fsOptionsKeywords contained /\<fsync_mode=/ nextgroup=fsOptionsF2fsFsyncMode
216syn keyword fsOptionsF2fsFsyncMode contained posix strict nobarrier
217syn match fsOptionsKeywords contained /\<compress_mode=/ nextgroup=fsOptionsF2fsCompressMode
218syn keyword fsOptionsF2fsCompressMode contained fs user
219syn match fsOptionsKeywords contained /\<discard_unit=/ nextgroup=fsOptionsF2fsDiscardUnit
220syn keyword fsOptionsF2fsDiscardUnit contained block segment section
221syn match fsOptionsKeywords contained /\<memory=/ nextgroup=fsOptionsF2fsMemory
222syn keyword fsOptionsF2fsMemory contained normal low
223syn match fsOptionsKeywords contained /\<\%(inline_xattr_size\|reserve_root\|fault_injection\|fault_type\|io_bits\|compress_log_size\)=/ nextgroup=fsOptionsNumber
224syn match fsOptionsKeywords contained /\<\%(prjjquota\|test_dummy_encryption\|checkpoint\|compress_algorithm\|compress_extension\|nocompress_extension\)=/ nextgroup=fsOptionsString
225syn keyword fsOptionsKeyWords contained gc_merge nogc_merge disable_roll_forward no_heap disable_ext_identify inline_xattr noinline_xattr inline_data noinline_data inline_dentry noinline_dentry flush_merge fastboot extent_cache noextent_cache data_flush offusrjquota offgrpjquota offprjjquota test_dummy_encryption checkpoint_merge nocheckpoint_merge compress_chksum compress_cache inlinecrypt atgc
226
227" Options: ffs
228syn keyword fsOptionsKeyWords contained noperm softdep
229
230" Options: gfs2
231syn match fsOptionsKeywords contained /\<\%(lockproto\|locktable\)=/ nextgroup=fsOptionsString
232syn match fsOptionsKeywords contained /\<\%(quota_quantum\|statfs_quantum\|statfs_percent\)=/ nextgroup=fsOptionsNumber
233syn match fsOptionsKeywords contained /\<quota=/ nextgroup=fsOptionsGfs2Quota
234syn keyword fsOptionsGfs2Quota contained off account on
235syn keyword fsOptionsKeywords contained localcaching localflocks ignore_local_fs upgrade spectator meta
236
237" Options: hpfs
238syn match fsOptionsKeywords contained /\<case=/ nextgroup=fsOptionsHpfsCase
239syn keyword fsOptionsHpfsCase contained lower asis
240syn match fsOptionsKeywords contained /\<chkdsk=/ nextgroup=fsOptionsHpfsChkdsk
241syn keyword fsOptionsHpfsChkdsk contained no errors always
242syn match fsOptionsKeywords contained /\<eas=/ nextgroup=fsOptionsHpfsEas
243syn keyword fsOptionsHpfsEas contained no ro rw
244syn match fsOptionsKeywords contained /\<timeshift=/ nextgroup=fsOptionsNumberSigned
245
246" Options: iso9660
247syn match fsOptionsKeywords contained /\<map=/ nextgroup=fsOptionsIsoMap
248syn match fsOptionsKeywords contained /\<block=/ nextgroup=fsOptionsSize
249syn match fsOptionsKeywords contained /\<\%(session\|sbsector\|dmode\)=/ nextgroup=fsOptionsNumber
250syn keyword fsOptionsIsoMap contained n o a normal off acorn
251syn keyword fsOptionsKeywords contained norock nojoliet hide unhide cruft overriderockperm showassoc
252syn keyword fsOptionsConv contained m mtext
253
254" Options: jfs
255syn keyword fsOptionsKeywords nointegrity integrity
256
257" Options: nfs
258syn match fsOptionsKeywords contained /\<lookupcache=/ nextgroup=fsOptionsNfsLookupCache
259syn keyword fsOptionsNfsLookupCache contained all none pos positive
260syn match fsOptionsKeywords contained /\<local_lock=/ nextgroup=fsOptionsNfsLocalLock
261syn keyword fsOptionsNfsLocalLock contained all flock posix none
262syn match fsOptionsKeywords contained /\<\%(mounthost\|mountprog\|nfsprog\|namelen\|proto\|mountproto\|clientaddr\)=/ nextgroup=fsOptionsString
263syn match fsOptionsKeywords contained /\<\%(timeo\|retrans\|[rw]size\|acregmin\|acregmax\|acdirmin\|acdirmax\|actimeo\|retry\|port\|mountport\|mountvers\|namlen\|nfsvers\|vers\|minorversion\)=/ nextgroup=fsOptionsNumber
264syn keyword fsOptionsKeywords contained bg fg soft hard intr cto ac tcp udp lock nobg nofg nosoft nohard nointr noposix nocto noac notcp noudp nolock sharecache nosharecache resvport noresvport rdirplus nordirplus
265
266" Options: nilfs2
267syn match fsOptionsKeywords contained /\<order=/ nextgroup=fsOptionsNilfs2Order
268syn keyword fsOptionsNilfs2Order contained relaxed strict
269syn match fsOptionsKeywords contained /\<\%([cp]p\)=/ nextgroup=fsOptionsNumber
270syn keyword fsOptionsKeywords contained nogc
271
272" Options: ntfs
273syn match fsOptionsKeywords contained /\<mft_zone_multiplier=/ nextgroup=fsOptionsNtfsMftZoneMultiplier
274syn keyword fsOptionsNtfsMftZoneMultiplier contained 1 2 3 4
275syn match fsOptionsKeywords contained /\<\%(posix=*\|uni_xlate=\)/ nextgroup=fsOptionsNumber
276syn match fsOptionsKeywords contained /\<\%(sloppy\|show_sys_files\|case_sensitive\|disable_sparse\)=/ nextgroup=fsOptionsTrueFalse
277syn keyword fsOptionsKeywords contained utf8
278
279" Options: ntfs3
280syn keyword fsOptionsKeywords contained noacsrules nohidden sparse showmeta prealloc
281
282" Options: ntfs-3g
283syn match fsOptionsKeywords contained /\<\%(usermapping\|locale\|streams_interface\)=/ nextgroup=fsOptionsString
284syn keyword fsOptionsKeywords contained permissions inherit recover norecover ignore_case remove_hiberfile hide_hid_files hide_dot_files windows_names silent no_def_opts efs_raw compression nocompression no_detach
285
286" Options: ocfs2
287syn match fsOptionsKeywords contained /\<\%(resv_level\|dir_resv_level\)=/ nextgroup=fsOptionsOcfs2ResvLevel
288syn keyword fsOptionsOcfs2ResvLevel contained 0 1 2 3 4 5 6 7 8
289syn match fsOptionsKeywords contained /\<coherency=/ nextgroup=fsOptionsOcfs2Coherency
290syn keyword fsOptionsOcfs2Coherency contained full buffered
291syn match fsOptionsKeywords contained /\<\%(atime_quantum\|preferred_slot\|localalloc\)=/ nextgroup=fsOptionsNumber
292syn keyword fsOptionsKeywords contained strictatime inode64
293
294" Options: overlay
295syn match fsOptionsKeywords contained /\<\%(index\|uuid\|nfs_export\|metacopy\)=/ nextgroup=fsOptionsOverlayBool
296syn keyword fsOptionsOverlayBool contained on off
297syn match fsOptionsKeywords contained /\<\%(lowerdir\|upperdir\|workdir\)=/ nextgroup=fsOptionsOverlayDir
298syn match fsOptionsOverlayDir contained /[^,[:space:]]*/
299syn match fsOptionsKeywords contained /\<redirect_dir=/ nextgroup=fsOptionsOverlayRedirectDir
300syn keyword fsOptionsOverlayRedirectDir contained on follow off nofollow
301syn match fsOptionsKeywords contained /\<xino=/ nextgroup=fsOptionsOverlayXino
302syn keyword fsOptionsOverlayXino contained on off auto
303syn keyword fsOptionsKeywords contained userxattr volatile
304
305" Options: proc
306syn match fsOptionsKeywords contained /\<\%(hidepid\|subset\)=/ nextgroup=fsOptionsString
307
308" Options: qnx4
309syn match fsOptionsKeywords contained /\<bitmap=/ nextgroup=fsOptionsQnx4Bitmap
310syn keyword fsOptionsQnx4Bitmap contained always lazy nonrmv
311syn keyword fsOptionsKeywords contained grown noembed overalloc unbusy
312
313" Options: qnx6
314syn match fsOptionsKeywords contained /\<hold=/ nextgroup=fsOptionsQnx6Hold
315syn keyword fsOptionsQnx6Hold contained allow root deny
316syn match fsOptionsKeywords contained /\<sync=/ nextgroup=fsOptionsQnx6Sync
317syn keyword fsOptionsQnx6Sync contained mandatory optional none
318syn match fsOptionsKeywords contained /\<snapshot=/ nextgroup=fsOptionsNumber
319syn keyword fsOptionsKeywords contained alignio
320
321" Options: reiserfs
322syn match fsOptionsKeywords contained /\<hash=/ nextgroup=fsOptionsReiserHash
323syn match fsOptionsKeywords contained /\<resize=/ nextgroup=fsOptionsNumber
324syn keyword fsOptionsReiserHash contained rupasov tea r5 detect
325syn keyword fsOptionsKeywords contained hashed_relocation noborder nolog notail no_unhashed_relocation replayonly
326
327" Options: sshfs
328syn match fsOptionsKeywords contained /\<\%(BatchMode\|ChallengeResponseAuthentication\|CheckHostIP\|ClearAllForwardings\|Compression\|EnableSSHKeysign\|ForwardAgent\|ForwardX11\|ForwardX11Trusted\|GatewayPorts\|GSSAPIAuthentication\|GSSAPIDelegateCredentials\|HashKnownHosts\|HostbasedAuthentication\|IdentitiesOnly\|NoHostAuthenticationForLocalhost\|PasswordAuthentication\|PubkeyAuthentication\|RhostsRSAAuthentication\|RSAAuthentication\|TCPKeepAlive\|UsePrivilegedPort\)=/ nextgroup=fsOptionsYesNo
329syn match fsOptionsKeywords contained /\<\%(ControlMaster\|StrictHostKeyChecking\|VerifyHostKeyDNS\)=/ nextgroup=fsOptionsSshYesNoAsk
330syn match fsOptionsKeywords contained /\<\%(AddressFamily\|BindAddress\|Cipher\|Ciphers\|ControlPath\|DynamicForward\|EscapeChar\|GlobalKnownHostsFile\|HostKeyAlgorithms\|HostKeyAlias\|HostName\|IdentityFile\|KbdInteractiveDevices\|LocalForward\|LogLevel\|MACs\|PreferredAuthentications\|Protocol\|ProxyCommand\|RemoteForward\|RhostsAuthentication\|SendEnv\|SmartcardDevice\|User\|UserKnownHostsFile\|XAuthLocation\|comment\|workaround\|idmap\|ssh_command\|sftp_server\|fsname\)=/ nextgroup=fsOptionsString
331syn match fsOptionsKeywords contained /\<\%(CompressionLevel\|ConnectionAttempts\|ConnectTimeout\|NumberOfPasswordPrompts\|Port\|ServerAliveCountMax\|ServerAliveInterval\|cache_timeout\|cache_X_timeout\|ssh_protocol\|directport\|max_read\|umask\|uid\|gid\|entry_timeout\|negative_timeout\|attr_timeout\)=/ nextgroup=fsOptionsNumber
332syn keyword fsOptionsKeywords contained reconnect sshfs_sync no_readahead sshfs_debug transform_symlinks allow_other allow_root nonempty default_permissions large_read hard_remove use_ino readdir_ino direct_io kernel_cache
333syn keyword fsOptionsSshYesNoAsk contained yes no ask
334
335" Options: subfs
336syn match fsOptionsKeywords contained /\<fs=/ nextgroup=fsOptionsString
337syn keyword fsOptionsKeywords contained procuid
338
339" Options: swap
340syn match fsOptionsKeywords contained /\<pri=/ nextgroup=fsOptionsNumber
341
342" Options: ubifs
343syn match fsOptionsKeywords contained /\<\%(compr\|auth_key\|auth_hash_name\)=/ nextgroup=fsOptionsString
344syn keyword fsOptionsKeywords contained bulk_read no_bulk_read chk_data_crc no_chk_data_crc
345
346" Options: tmpfs
347syn match fsOptionsKeywords contained /\<huge=/ nextgroup=fsOptionsTmpfsHuge
348syn keyword fsOptionsTmpfsHuge contained never always within_size advise deny force
349syn match fsOptionsKeywords contained /\<\%(size\|mpol\)=/ nextgroup=fsOptionsString
350syn match fsOptionsKeywords contained /\<nr_\%(blocks\|inodes\)=/ nextgroup=fsOptionsNumber
351
352" Options: udf
353syn match fsOptionsKeywords contained /\<\%(anchor\|partition\|lastblock\|fileset\|rootdir\)=/ nextgroup=fsOptionsString
354syn keyword fsOptionsKeywords contained unhide undelete strict nostrict novrs adinicb noadinicb shortad longad
355
356" Options: ufs
357syn match fsOptionsKeywords contained /\<ufstype=/ nextgroup=fsOptionsUfsType
358syn match fsOptionsKeywords contained /\<onerror=/ nextgroup=fsOptionsUfsError
359syn keyword fsOptionsUfsType contained old hp 44bsd sun sunx86 nextstep openstep
360syn match fsOptionsUfsType contained /\<nextstep-cd\>/
361syn keyword fsOptionsUfsError contained panic lock umount repair
362
363" Options: usbfs
364syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)\%(id\|gid\)=/ nextgroup=fsOptionsNumber
365syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)mode=/ nextgroup=fsOptionsNumberOctal
366
367" Options: v9fs
368syn match fsOptionsKeywords contained /\<\%(trans\)=/ nextgroup=fsOptionsV9Trans
369syn keyword fsOptionsV9Trans unix tcp fd virtio rdma
370syn match fsOptionsKeywords contained /\<debug=/ nextgroup=fsOptionsV9Debug
371syn keyword fsOptionsV9Debug 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 0x100 0x200 0x400 0x800
372syn match fsOptionsKeywords contained /\<version=/ nextgroup=fsOptionsV9Version
373syn keyword fsOptionsV9Version 9p2000 9p2000.u 9p2000.L
374syn match fsOptionsKeywords contained /\<\%([ua]name\|[rw]fdno\|access\)=/ nextgroup=fsOptionsString
375syn match fsOptionsKeywords contained /\<msize=/ nextgroup=fsOptionsNumber
376syn keyword fsOptionsKeywords contained noextend dfltuid dfltgid afid nodevmap cachetag
377
378" Options: vfat
379syn match fsOptionsKeywords contained /\<shortname=/ nextgroup=fsOptionsVfatShortname
380syn keyword fsOptionsVfatShortname contained lower win95 winnt mixed
381syn match fsOptionsKeywords contained /\<nfs=/ nextgroup=fsOptionsVfatNfs
382syn keyword fsOptionsVfatNfs contained stale_rw nostale_ro
383syn match fsOptionsKeywords contained /\<\%(tz\|dos1xfloppy\)=/ nextgroup=fsOptionsString
384syn match fsOptionsKeywords contained /\<\%(allow_utime\|codepage\)=/ nextgroup=fsOptionsNumber
385syn match fsOptionsKeywords contained /\<time_offset=/ nextgroup=fsOptionsNumberSigned
386syn keyword fsOptionsKeywords contained nonumtail posix utf8 usefree flush rodir
387
388" Options: xfs
389syn match fsOptionsKeywords contained /\<logbufs=/ nextgroup=fsOptionsXfsLogBufs
390syn keyword fsOptionsXfsLogBufs contained 2 3 4 5 6 7 8
391syn match fsOptionsKeywords contained /\%(allocsize\|biosize\|logbsize\|logdev\|rtdev\|sunit\|swidth\)=/ nextgroup=fsOptionsString
392syn keyword fsOptionsKeywords contained dmapi xdsm noalign noatime noquota norecovery osyncisdsync quota usrquota uqnoenforce grpquota gqnoenforce attr2 noattr2 filestreams ikeep noikeep inode32 inode64 largeio nolargeio nouuid uquota qnoenforce gquota pquota pqnoenforce swalloc wsync
393
394" Frequency / Pass No.
395syn cluster fsFreqPassCluster contains=fsFreqPassNumber,fsFreqPassError
396syn match fsFreqPassError /\s\+\zs\%(\D.*\|\S.*\|\d\+\s\+[^012]\)\ze/ contained
397syn match fsFreqPassNumber /\d\+\s\+[012]\s*/ contained
398
399" Groups
400syn match fsDevice /^\s*\zs.\{-1,}\s/me=e-1 nextgroup=fsMountPoint contains=@fsDeviceCluster,@fsGeneralCluster
401syn match fsMountPoint /\s\+.\{-}\s/me=e-1 nextgroup=fsType contains=@fsMountPointCluster,@fsGeneralCluster contained
402syn match fsType /\s\+.\{-}\s/me=e-1 nextgroup=fsOptions contains=@fsTypeCluster,@fsGeneralCluster contained
403syn match fsOptions /\s\+.\{-}\%(\s\|$\)/ nextgroup=fsFreqPass contains=@fsOptionsCluster,@fsGeneralCluster contained
404syn match fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster contained
405
406" Whole line comments
407syn match fsCommentLine /^#.*$/ contains=@Spell
408
409if exists('b:fstab_enable_mtab') && b:fstab_enable_mtab == 1
410  " mtab
411  " ----
412  syn keyword fsDeviceKeyword contained binfmt_misc bpf cgroup2 configfs debugfs efivarfs fusectl hugetlbfs mqueue portal pstore securityfs udev ramfs
413  syn match fsDeviceKeyword contained /^systemd-1/
414  syn match fsDeviceKeyword contained /^\/dev\S\+/
415
416  " devpts
417  syn match fsOptionsKeywords contained /\<ptmxmode=/ nextgroup=fsOptionsNumber
418
419  " cgroup2
420  syn keyword fsTypeKeyword contained cgroup2
421  syn keyword fsOptionsKeywords contained nsdelegate memory_recursiveprot
422
423  " hugetlbfs
424  syn match fsOptionsKeywords contained /\<pagesize=/ nextgroup=fsOptionsString
425
426  " systemd
427  syn match fsOptionsKeywords contained /\<\%(pgrp\|timeout\|minproto\|maxproto\|pipe_ino\)=/ nextgroup=fsOptionsNumber
428  syn keyword fsOptionsKeywords contained direct
429endif
430
431hi def link fsOperator Operator
432hi def link fsComment Comment
433hi def link fsCommentLine Comment
434
435hi def link fsTypeKeyword Type
436hi def link fsDeviceKeyword Identifier
437hi def link fsDeviceLabel String
438hi def link fsDeviceUUID String
439hi def link fsDevicePARTLABEL String
440hi def link fsDevicePARTUUID String
441hi def link fsDeviceSshfs String
442hi def link fsFreqPassNumber Number
443
444if exists('fstab_unknown_fs_errors') && fstab_unknown_fs_errors == 1
445	hi def link fsTypeUnknown Error
446endif
447
448if !exists('fstab_unknown_device_errors') || fstab_unknown_device_errors == 1
449	hi def link fsDeviceError Error
450endif
451
452hi def link fsMountPointError Error
453hi def link fsMountPointKeyword Keyword
454hi def link fsFreqPassError Error
455
456hi def link fsOptionsBtrfsDiscard String
457hi def link fsOptionsBtrfsFatalErrors String
458hi def link fsOptionsBtrfsFragment String
459hi def link fsOptionsCache String
460hi def link fsOptionsCephRecoverSession String
461hi def link fsOptionsConv String
462hi def link fsOptionsDax String
463hi def link fsOptionsEroCacheStrategy String
464hi def link fsOptionsErrors String
465hi def link fsOptionsExt2Check String
466hi def link fsOptionsExt3Data String
467hi def link fsOptionsExt3DataErr String
468hi def link fsOptionsExt3Journal String
469hi def link fsOptionsExt3Jqfmt String
470hi def link fsOptionsExt4Data String
471hi def link fsOptionsExt4Journal String
472hi def link fsOptionsExt4JournalIoprio Number
473hi def link fsOptionsF2fsActiveLogs Number
474hi def link fsOptionsF2fsAllocMode String
475hi def link fsOptionsF2fsBackgroundGc String
476hi def link fsOptionsF2fsCompressMode String
477hi def link fsOptionsF2fsDiscardUnit String
478hi def link fsOptionsF2fsFsyncMode String
479hi def link fsOptionsF2fsMemory String
480hi def link fsOptionsFatCheck String
481hi def link fsOptionsFatType Number
482hi def link fsOptionsGeneral Type
483hi def link fsOptionsGfs2Quota String
484hi def link fsOptionsHpfsCase String
485hi def link fsOptionsHpfsChkdsk String
486hi def link fsOptionsHpfsEas String
487hi def link fsOptionsIsoMap String
488hi def link fsOptionsKeywords Keyword
489hi def link fsOptionsNfsLocalLock String
490hi def link fsOptionsNfsLookupCache String
491hi def link fsOptionsNilfs2Order String
492hi def link fsOptionsNtfsMftZoneMultiplier Number
493hi def link fsOptionsNumber Number
494hi def link fsOptionsNumberOctal Number
495hi def link fsOptionsNumberSigned Number
496hi def link fsOptionsOcfs2Coherency String
497hi def link fsOptionsOcfs2ResvLevel Number
498hi def link fsOptionsOverlayBool Boolean
499hi def link fsOptionsOverlayDir String
500hi def link fsOptionsOverlayRedirectDir String
501hi def link fsOptionsOverlayXino String
502hi def link fsOptionsQnx4Bitmap String
503hi def link fsOptionsQnx6Hold String
504hi def link fsOptionsQnx6Sync String
505hi def link fsOptionsReiserHash String
506hi def link fsOptionsSecurityMode String
507hi def link fsOptionsSize Number
508hi def link fsOptionsSshYesNoAsk String
509hi def link fsOptionsString String
510hi def link fsOptionsTmpfsHuge String
511hi def link fsOptionsUfsError String
512hi def link fsOptionsUfsType String
513hi def link fsOptionsV9Debug String
514hi def link fsOptionsV9Trans String
515hi def link fsOptionsV9Version String
516hi def link fsOptionsVfatNfs String
517hi def link fsOptionsVfatShortname String
518hi def link fsOptionsXfsLogBufs Number
519
520hi def link fsOptionsTrueFalse Boolean
521hi def link fsOptionsYesNo String
522hi def link fsOptionsYN String
523hi def link fsOptions01 Number
524
525let b:current_syntax = "fstab"
526
527let &cpo = s:cpo_save
528unlet s:cpo_save
529
530" vim: ts=8 noet ft=vim