Staship for shell consistency; move git aliases into git program

This commit is contained in:
Haak Saxberg 2023-11-17 14:38:32 -08:00
parent 0840692186
commit d1b9f3defe
3 changed files with 61 additions and 2 deletions

View file

@ -14,4 +14,47 @@ in
home.packages = defaultPkgs; home.packages = defaultPkgs;
xdg.enable = true; xdg.enable = true;
# Auto-completion helper
programs.carapace = {
enable = true;
enableNushellIntegration = true;
};
programs.starship = {
enable = true;
settings = {
add_newline = true;
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
directory = {
truncation_length = 100;
truncate_to_repo = false;
};
battery = {
disabled = true;
full_symbol = " ";
charging_symbol = " ";
discharging_symbol = " ";
unknown_symbol = " ";
empty_symbol = " ";
};
erlang = {
symbol = " ";
};
nodejs = {
symbol = "[](bold green) ";
};
pulumi = {
symbol = "🧊 ";
};
};
};
} }

View file

@ -32,4 +32,22 @@ in
".DS_Store" ".DS_Store"
]; ];
}; };
programs.nushell.shellAliases = {
gst = "git status";
gco = "git checkout";
gf = "git fetch";
gl = "git pull";
};
programs.nushell.extraConfig = ''
def glog [] { ^git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime} | sort-by date | reverse | explore }
'';
programs.zsh.shellAliases = {
gst = "git status";
glog = "git log --oneline --graph --decorate";
gco = "git checkout";
gf = "git fetch";
gl = "git pull";
};
} }

View file

@ -20,8 +20,6 @@ with builtins; {
custom = "$HOME/.oh-my-zsh/custom"; custom = "$HOME/.oh-my-zsh/custom";
plugins = [ plugins = [
"vi-mode" "vi-mode"
"git"
"z"
]; ];
}; };
}; };