add thefuck
This commit is contained in:
parent
1a853930e9
commit
a9b1743503
|
@ -1,12 +1,46 @@
|
||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
home-manager.users.zoe.programs.fish = {
|
home-manager.users.zoe.programs.fish = {
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
supercolor --columns 5
|
set -g man_blink -o red
|
||||||
|
set -g man_bold -o green
|
||||||
|
set -g man_standout -b black
|
||||||
|
supercolor --columns 5
|
||||||
'';
|
'';
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [{
|
shellAliases = {};
|
||||||
name = "pure";
|
plugins = [
|
||||||
src = pkgs.fishPlugins.pure.src;
|
{
|
||||||
}];
|
name = "pure";
|
||||||
|
src = pkgs.fishPlugins.pure.src;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "done";
|
||||||
|
src = pkgs.fishPlugins.done.src;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "autopair";
|
||||||
|
src = pkgs.fishPlugins.autopair-fish.src;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "fish-colored-man";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "decors";
|
||||||
|
repo = "fish-colored-man";
|
||||||
|
rev = "1ad8fff696d48c8bf173aa98f9dff39d7916de0e";
|
||||||
|
sha256 = "uoZ4eSFbZlsRfISIkJQp24qPUNqxeD0JbRb/gVdRYlA=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
functions = {
|
||||||
|
fuck = ''
|
||||||
|
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
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue