Add completions for ttx

This commit is contained in:
Mahmoud Al-Qudsi 2018-05-12 14:04:00 -05:00
parent 84fe46e763
commit 82c8abc4dc
2 changed files with 46 additions and 3 deletions

View file

@ -62,12 +62,13 @@ This section is for changes merged to the `major` branch that are not also merge
- Added completions for
- `bd` (#4472)
- `bower`<sup>&#x2217;</sup>
- `configure`
- `configure` (autoconf only)
- `j` (autojump #4344)
- `jhipster` (#4472)
- `ngrok` (#4642)
- `optipng`
- `port`
- `ttx`
- Improved completions for
- `brew`
- `diskutil`
@ -77,7 +78,7 @@ This section is for changes merged to the `major` branch that are not also merge
- `yarn`<sup>&#x2217;</sup><sup></sup>
&#x2217; _`jq` must be installed to complete the list of currently installed `bower` or `yarn` packages_. <br/>
† _to autocomplete the list of packages available for installation with `npm` or `yarn`, `all-the-package-names` must be installed (typically: `sudo npm install -g all-the-package-names`)._
† _to autocomplete the list of packages available for installation with `npm` or `yarn`, `all-the-package-names` must be installed globally (typically: `sudo npm install -g all-the-package-names`)._
--

View file

@ -0,0 +1,42 @@
# completions for ttx, xml font export utility
# Retrieved from http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=IWS-AppendixC
# Not all may be supported by ttx
set -l table_names name glyf cmap post OS/2 head hmtx hhea kern hdmx LTHS vmtx vhea VDMX loca maxp DSIG PCLT gasp prep fpgm cvt CFF VORG EBDT EBLC EBSC GSUB GPOS GDEF BASE JSTF Silf Glat Gloc Feat mort morx feat acnt bsln just lcar fdsc fmtx prop Zapf opbd trak fvar gvar avar cvar bdat bhed bloc hsty PfEd TeX BDF FFTM
set -l formats raw row bitwise extfile
set -l line_endings LF CR CRLF
set -l woff_fmts woff woff2
complete -f -c ttx -a '(__fish_complete_suffix .{otf,ttf,ttx,ttc})'
complete -c ttx -f -n '__fish_is_first_token' -a '(__fish_complete_suffix .{otf,ttf,ttx})'
# General options
complete -c ttx -f -s 'h' -d'Show help message'
complete -c ttx -f -l 'version' -d'Show version info'
complete -c ttx -x -s 'd' -d'Set output folder' -a '(__fish_complete_directories)'
complete -c ttx -r -s 'o' -d'Set output filename' -a '(__fish_complete_suffix .{otf,ttf,ttx})'
complete -c ttx -f -s 'f' -d'Force output overwrite'
complete -c ttx -f -s 'v' -d'Verbose output'
complete -c ttx -f -s 'q' -d'Quiet mode'
complete -c ttx -f -s 'a' -d'Allow virtual glyph IDs'
# Dump options
complete -c ttx -f -s 'l' -d'List table info'
complete -c ttx -x -s 't' -d'Dump named table' -a "(printf '%s\n' $table_names)"
complete -c ttx -x -s 'x' -d'Exclude named table' -a "(printf '%s\n' $table_names)"
complete -c ttx -f -s 's' -d'Split tables'
complete -c ttx -f -s 'g' -d'Split glyf tables'
complete -c ttx -f -s 'i' -d'Do NOT disassemble TT instructions'
complete -c ttx -x -s 'z' -d'Use FORMAT for EBDT or CBDT' -a "(printf '%s\n' $formats)"
complete -c ttx -f -s 'e' -d'Don\'t ignore decompilation errors'
complete -c ttx -x -s 'y' -d'Select font index for TrueType Collection'
complete -c ttx -x -l 'unicodedata' -d'Custom database for character names [UnicodeData.txt]' -a '(__fish_complete_suffix .txt)'
complete -c ttx -x -l 'newline' -d'Set EOL format' -a "(printf '%s\n' $line_endings)"
# Compile options
complete -c ttx -x -s 'm' -d'Merge named TTF/OTF with SINGLE .ttx input' -a '(__fish_complete_suffix .{otf,ttf})'
complete -c ttx -f -s 'b' -d'Don\'t recalculate glyph bounding boxes'
complete -c ttx -f -l 'recalc-timestamp' -d'Set font modified timestamp to current time'
complete -c ttx -x -l 'flavor' -d'Set WOFF flavor' -a "(printf '%s\n' $woff_fmts)"
complete -c ttx -f -l 'with-zopfli' -d'Compress with zopfli instead of zlib'