Created
May 11, 2023 20:04
-
-
Save faho/61e18536557f781c18f98968ff851f7f to your computer and use it in GitHub Desktop.
fishshell Goblin Mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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