Skip to content

Instantly share code, notes, and snippets.

@MeganerdNL
Last active January 23, 2026 12:17
Show Gist options
  • Select an option

  • Save MeganerdNL/06f356dedcf03c078bec74e5258e8421 to your computer and use it in GitHub Desktop.

Select an option

Save MeganerdNL/06f356dedcf03c078bec74e5258e8421 to your computer and use it in GitHub Desktop.
Syntax highlighting for nano for fish shell scripts
## Syntax highlighting for fish shell scripts.
## Original author: Anthony Scopatz (https://github.com/scopatz)
## License: GPL version 3 or newer
syntax "Fish" "\.fish$"
header "^#!.*/(env +)?fish( |$)"
icolor brightgreen "^[0-9A-Z_]+\(\)"
color green "\<(alias|begin|break|case|continue|contains|else|end|for|function|if|math|return|set|switch|test|while)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color green "\<(and|isatty|not|or|in)\>"
color yellow "--[a-z-]+"
color brightmagenta "\ -[a-z]+"
color brightblue "\<(bg|bind|block|breakpoint|builtin|cd|command|commandline|complete|dirh|dirs|echo|emit|eval|exec|exit|fg|fish|f>
icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
color cyan "(^|[[:space:]])#.*$"
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
color ,green "[[:space:]]+$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment