Skip to content

Instantly share code, notes, and snippets.

@uncomfyhalomacro
Last active October 24, 2020 14:45
Show Gist options
  • Save uncomfyhalomacro/8601c45daa4d4d0ba87e0b5341f830a4 to your computer and use it in GitHub Desktop.
Save uncomfyhalomacro/8601c45daa4d4d0ba87e0b5341f830a4 to your computer and use it in GitHub Desktop.
# ~/.config/fish/config.fish
# Keybindings
function fish_greeting
fortune | cowsay -f (random choice /usr/share/cows/**cow) | lolcat
end
# fish_vi_key_bindings
# Imports here
starship init fish | source
pyenv init - | source
# Functions here
function starwars
telnet towel.blinkenlights.nl
end
function bye --on-process-exit %self
builtin history clear
echo 📕 - Session history scrubbed. Goodbye!
end
function vi-mode --on-process-exit %self
fish_vi_key_bindings
echo Vim Mode!
end
function def-mode --on-process-exit %self
fish_default_key_bindings
echo Default Mode!
end
function !!
eval command $history[1]
end
# This is to emulate `sudo !!`
function sudo
if test "$argv" = !!
eval command sudo $history[1]
else
command sudo $argv
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment