yaml icon indicating copy to clipboard operation
yaml copied to clipboard

magic(5) entry

Open daxim opened this issue 11 years ago • 1 comments

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

daxim avatar Oct 14 '13 19:10 daxim

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

dupuy avatar May 02 '14 00:05 dupuy