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

magic(5) entry #3

Open
daxim opened this issue Oct 14, 2013 · 1 comment
Open

magic(5) entry #3

daxim opened this issue Oct 14, 2013 · 1 comment

Comments

@daxim
Copy link

daxim commented Oct 14, 2013

Contribute a description of the %YAML header in magic(5) format to libmagic so that the file(1) command etc. may recognise YAML files.

http://www.darwinsys.com/file/
http://mx.gw.com/mailman/listinfo/file

@dupuy
Copy link

dupuy commented May 2, 2014

I've had decent success with file -m yaml.magic, where yaml.magic is the following:


#------------------------------------------------------------------------------
# $File$
# yaml:  file(1) magic for Yet Another Markup Language
#

0   string/b    %YAML\      YAML
!:mime  text/yaml
>6  regex       [12]\.[0-9] version %s document text

0   string      ---\n       YAML document text
!:mime  text/yaml

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

No branches or pull requests

2 participants