From 5c79902f4e3a1f548a59a7f5b11292e4d5818c44 Mon Sep 17 00:00:00 2001 From: Bruno Carlin Date: Mon, 20 Feb 2017 10:32:16 +0100 Subject: [PATCH] add fish config --- fish/.config/fish/config.fish | 22 ++++++++++++++++++++++ fish/.config/fish/functions/email.fish | 20 ++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 fish/.config/fish/config.fish create mode 100644 fish/.config/fish/functions/email.fish 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