From 48ea8cd477c152955f943655d7dfbda978ccc57c Mon Sep 17 00:00:00 2001 From: Bruno Carlin Date: Mon, 3 Feb 2020 11:07:54 +0100 Subject: [PATCH] add functions for br and thefuck in fish --- fish/.config/fish/conf.d/br.fish | 1 + fish/.config/fish/functions/fuck.fish | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 120000 fish/.config/fish/conf.d/br.fish create mode 100644 fish/.config/fish/functions/fuck.fish diff --git a/fish/.config/fish/conf.d/br.fish b/fish/.config/fish/conf.d/br.fish new file mode 120000 index 0000000..604cf3e --- /dev/null +++ b/fish/.config/fish/conf.d/br.fish @@ -0,0 +1 @@ +/home/bca/.local/share/broot/launcher/fish/1.fish \ No newline at end of file diff --git a/fish/.config/fish/functions/fuck.fish b/fish/.config/fish/functions/fuck.fish new file mode 100644 index 0000000..90d4f19 --- /dev/null +++ b/fish/.config/fish/functions/fuck.fish @@ -0,0 +1,9 @@ +function fuck -d "Correct your previous console command" + set -l fucked_up_command $history[1] + env TF_SHELL=fish TF_ALIAS=fuck PYTHONIOENCODING=utf-8 thefuck $fucked_up_command THEFUCK_ARGUMENT_PLACEHOLDER $argv | read -l unfucked_command + if [ "$unfucked_command" != "" ] + eval $unfucked_command + builtin history delete --exact --case-sensitive -- $fucked_up_command + builtin history merge ^ /dev/null + end +end