Skip to content

Instantly share code, notes, and snippets.

@MeganerdNL
MeganerdNL / fish.nanorc
Last active January 23, 2026 12:17
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 "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
@MeganerdNL
MeganerdNL / mc.fish
Last active January 23, 2026 12:46
mc-wrapper script to exit in the last active directory of Midnight Commander for the fish shell. Place in: ~/.config/fish/functions/mc.fish
## Original author: Arkadiusz Halicki (https://github.com/halicki)
## Adjusted with help from: Azlan Mukhtar (https://github.com/azlan)
function mc
set SHELL_PID %self
if not test -d "/tmp/mc-$USER"
mkdir -p "/tmp/mc-$USER"
end