git aliases

This commit is contained in:
2026-06-20 00:49:35 -05:00
parent e638b5b3df
commit ccedba3998
+15 -4
View File
@@ -2,8 +2,19 @@
programs.fish = { programs.fish = {
enable = true; enable = true;
functions.fish_greeting = ""; shellAliases = {
functions.fish_prompt = '' ga = "git add .";
gc = "git commit -am";
gp = "git push";
gpr = "git pull --rebase";
gl = "git pull";
};
functions = {
fish_greeting = "";
fish_prompt = ''
set -l last_pipestatus $pipestatus set -l last_pipestatus $pipestatus
set -lx __fish_last_status $status # Export for __fish_print_pipestatus. set -lx __fish_last_status $status # Export for __fish_print_pipestatus.
set -l normal (set_color normal) set -l normal (set_color normal)
@@ -35,7 +46,7 @@
echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " " echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " "
''; '';
functions.prompt_pwd = '' prompt_pwd = ''
set -l options h/help d/dir-length= D/full-length-dirs= set -l options h/help d/dir-length= D/full-length-dirs=
argparse -n prompt_pwd $options -- $argv argparse -n prompt_pwd $options -- $argv
or return or return
@@ -75,5 +86,5 @@
end end
''; '';
}; };
};
} }