Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fstab syntax definitions #696

Merged
merged 2 commits into from
Oct 28, 2019
Merged

Add fstab syntax definitions #696

merged 2 commits into from
Oct 28, 2019

Conversation

flopp
Copy link
Contributor

@flopp flopp commented Oct 21, 2019

This commit adds simple syntax definitions for fstab files.

@sharkdp
Copy link
Owner

sharkdp commented Oct 21, 2019

Awesome, thank you very much!

Works great for me:
image

Two questions:

  • Since we "understand" which field is which, it would be great if we could highlight the <type> and the <options> fields in different colors. Maybe even separate colors for the two filepaths/UUIDS. I know it's hard to choose appropriate scopes (http://www.sublimetext.com/docs/3/scope_naming.html), but it would be a great visual aid to parse the file quickly. As a bonus, we could even parse the comma-separated options-string and highlight known keywords.
  • I think we could also match on mtab (/etc/mtab), as it seems to have the same syntax. Not completely sure on that, though.

@eth-p
Copy link
Collaborator

eth-p commented Oct 23, 2019

I agree with @sharkdp. It would be a great visual aid to have different colors for <type> and for each field in <options>.

@eth-p
Copy link
Collaborator

eth-p commented Oct 23, 2019

@flopp @sharkdp: How about this for colors? I tried to base it off of the scheme in #698.

image

I forked @flopp's branch and edited the syntax file in eth-p@f7ede0d to come up with that. If you like it, you can merge it back into this PR.

@sharkdp
Copy link
Owner

sharkdp commented Oct 28, 2019

@eth-p looks great.

@flopp
Copy link
Contributor Author

flopp commented Oct 28, 2019

@eth-p good job. I like it!

@eth-p
Copy link
Collaborator

eth-p commented Oct 28, 2019

Great! I'll merge this PR and open a new one for the added colors.

@eth-p eth-p merged commit 59f2b30 into sharkdp:master Oct 28, 2019
@sharkdp
Copy link
Owner

sharkdp commented Mar 22, 2020

This has been released in bat 0.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants