Staship for shell consistency; move git aliases into git program
This commit is contained in:
parent
0840692186
commit
d1b9f3defe
3 changed files with 61 additions and 2 deletions
|
|
@ -14,4 +14,47 @@ in
|
|||
home.packages = defaultPkgs;
|
||||
|
||||
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 = "🧊 ";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,4 +32,22 @@ in
|
|||
".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";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ with builtins; {
|
|||
custom = "$HOME/.oh-my-zsh/custom";
|
||||
plugins = [
|
||||
"vi-mode"
|
||||
"git"
|
||||
"z"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue