diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish new file mode 100644 index 0000000..a9d1be8 --- /dev/null +++ b/fish/.config/fish/config.fish @@ -0,0 +1,22 @@ +## PATH + +set -x PATH $PATH ~/.local/bin ~/.go/bin +set -x EDITOR nano + +## Go utils + +set -x GOPATH ~/.go + + +function bind_bang + switch (commandline -t)[-1] + case "!" + commandline -t $history[1]; commandline -f repaint + case "*" + commandline -i ! + end +end + +function fish_user_key_bindings + bind ! bind_bang +end diff --git a/fish/.config/fish/functions/email.fish b/fish/.config/fish/functions/email.fish new file mode 100644 index 0000000..fce0fd1 --- /dev/null +++ b/fish/.config/fish/functions/email.fish @@ -0,0 +1,20 @@ +function email --description 'Opens mutt with a specific account (waarp|perso)' + set account waarp + set usage 'Opens mutt with a specific account (waarp|perso)' + + if test (count $argv) -gt 0 + switch $argv[1] + case -h --help + echo $usage + return + case waarp perso bcarlin + set account $argv[1] + case '*' + echo "Bad account!" + echo $usage + return + end + end + + env EMAIL_ACCOUNT=$account mutt +end