Closed alexmyczko closed 3 years ago
Do you want these warnings fixed? I would be happy to help.
The problem I want to fix atm is it fails with font filenames with spaces in it. HALP!!1
@alexmyczko Do you have an example?
yes,fnt install courier-prime
it would install, but fnt list
would list the fonts without [glyphcount]. another error to catch is giving the install a font that doesn't exist...
@NNBnh thanks, I hope you don't mind me editing your attempt and then applying?
In /usr/bin/fnt line 49: if [ ! $? -eq 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
In /usr/bin/fnt line 74: ls -1 $HOME/Library/Fonts/.?tf $HOME/.fonts/.?tf 2>/dev/null | while read f; do ^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames. ^---^ SC2086: Double quote to prevent globbing and word splitting. ^---^ SC2086: Double quote to prevent globbing and word splitting. ^--^ SC2162: read without -r will mangle backslashes.
Did you mean: ls -1 "$HOME"/Library/Fonts/.?tf "$HOME"/.fonts/.?tf 2>/dev/null | while read f; do
In /usr/bin/fnt line 75: echo "$f" [$(otfinfo -u "$f" 2>/dev/null|wc -l|awk '{print $1}')] | sed s,.*/,, ^-- SC2046: Quote this to prevent word splitting.
For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2012 -- Use find instead of ls to better ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
good enough.