mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-11-04 09:01:56 +00:00 
			
		
		
		
	Merge pull request #696 from flopp/fstab-syntax
Add fstab syntax definitions
This commit is contained in:
		
							
								
								
									
										25
									
								
								assets/syntaxes/Fstab.sublime-syntax
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								assets/syntaxes/Fstab.sublime-syntax
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
%YAML 1.2
 | 
			
		||||
---
 | 
			
		||||
# http://www.sublimetext.com/docs/3/syntax.html
 | 
			
		||||
name: fstab
 | 
			
		||||
file_extensions:
 | 
			
		||||
  - fstab
 | 
			
		||||
scope: source.fstab
 | 
			
		||||
 | 
			
		||||
contexts:
 | 
			
		||||
  main:
 | 
			
		||||
    - match: '^\s*\#.*'
 | 
			
		||||
      scope: comment.line.number-sign
 | 
			
		||||
      comment: just a comment line
 | 
			
		||||
    - match: ^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(0|1)\s+(0|1|2)\s*$
 | 
			
		||||
      captures:
 | 
			
		||||
        1: entity.name.device.fstab
 | 
			
		||||
        2: entity.name.mountpoint.fstab
 | 
			
		||||
        3: entity.name.type.fstab
 | 
			
		||||
        4: entity.name.options.fstab
 | 
			
		||||
        5: constant.numeric.dump.fstab
 | 
			
		||||
        6: constant.numeric.pass.fstab
 | 
			
		||||
      comment: a valid fstab line with 6 space-separated token groups
 | 
			
		||||
    - match: '^.*$'
 | 
			
		||||
      scope: invalid.illegal.fstab
 | 
			
		||||
      comment: everything else, probably an error
 | 
			
		||||
		Reference in New Issue
	
	Block a user