becko becko - 18 days ago 5
Bash Question

Make Sublime Text color common Bash commands (cp, mv, ...)

By default Sublime Text colors Bash keywords like

echo
,
for
,
time
, and some more. However, I like how gEdit also colors
cp
,
mv
, and some others that Sublime Text doesn't highlight. How can I make Sublime Text recognize
cp
and
mv
(and maybe others) as keyboards and highlight them, for Bash script files (.sh)?

AGS AGS
Answer

Command Palette -> PackageResourceViewer: Open Resource -> ShellScript -> Shell-Unix-Generic.tmLanguage

Scroll down to ~ line 1750 and add/edit support.function.builtin.shell

<dict>
  <key>match</key>
    <string>(?&lt;![-/])\b(?:alias|bg|bind|break|builtin|caller|cd|command|....)\b</string>
  <key>name</key>
    <string>support.function.builtin.shell</string>
</dict>
Comments