Skip to content

Instantly share code, notes, and snippets.

@faho
Created May 11, 2023 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faho/61e18536557f781c18f98968ff851f7f to your computer and use it in GitHub Desktop.
Save faho/61e18536557f781c18f98968ff851f7f to your computer and use it in GitHub Desktop.
fishshell Goblin Mode
function goblin-mode --on-event fish_postexec
path is -rd /usr/share/fortune; and read -lz all <(random choice (string match -v '*.dat' -- /usr/share/fortune/*))
and random choice (string split \n%\n -- $all)
for var in (set -n | string match 'fish_*color*')
set -g $var (random choice (set_color -c | string match -v black))
end
fish_config prompt choose (random choice (fish_config prompt list))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment