shell aliases fix for both shells same

This commit is contained in:
foglar 2024-12-27 21:36:19 +01:00
parent 2fdd26e34f
commit c2eaa3b7df

View File

@ -3,38 +3,38 @@
config, config,
pkgs, pkgs,
... ...
}: { }: let
shellAliases = {
ls = "${pkgs.eza}/bin/eza --icons";
ll = "${pkgs.eza}/bin/eza -alh --icons";
l = "${pkgs.eza}/bin/eza -lh --icons=auto";
tree = "${pkgs.eza}/bin/eza --tree --icons";
open = "rifle";
ip = "ip -c";
s = "kitten ssh";
diff = "diff --color";
respawn = "clear; ${pkgs.pfetch}/bin/pfetch";
mkdir = "mkdir -p";
cat = "${pkgs.bat}/bin/bat --style plain";
rasp = "s masaoka";
hist = "history | awk '{for (i=2; i<=NF; i++) printf \$i\" \"; print \"\"}' | fzf | wl-copy";
cdx = "${pkgs.zoxide}/bin/zoxide query --interactive";
#distrobox-enter = "distrobox-enter --root";
#distrobox-create = "distrobox-create --root";
#distrobox-list = "distrobox-list --root";
};
in {
options = { options = {
sh.bash.enable = lib.mkEnableOption "enables shell bash"; sh.bash.enable = lib.mkEnableOption "enables shell bash";
sh.zsh.enable = lib.mkEnableOption "enables shell zsh"; sh.zsh.enable = lib.mkEnableOption "enables shell zsh";
}; };
config = lib.mkMerge [ config = lib.mkMerge [
(lib.mkIf config.sh.bash.enable { (lib.mkIf config.sh.bash.enable {
programs.bash = { programs.bash = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
shellAliases = { shellAliases = shellAliases;
ls = "${pkgs.eza}/bin/eza --icons";
ll = "${pkgs.eza}/bin/eza -alh --icons";
l = "${pkgs.eza}/bin/eza -lh --icons=auto";
tree = "${pkgs.eza}/bin/eza --tree --icons";
open = "rifle";
ip = "ip -c";
s = "kitten ssh";
diff = "diff --color";
respawn = "clear; ${pkgs.pfetch}/bin/pfetch";
mkdir = "mkdir -p";
cat = "${pkgs.bat}/bin/bat --style plain";
rasp = "s masaoka";
hist = "history | awk '{for (i=2; i<=NF; i++) printf \$i\" \"; print \"\"}' | fzf | wl-copy";
cdx = "${pkgs.zoxide}/bin/zoxide query --interactive";
#distrobox-enter = "distrobox-enter --root";
#distrobox-create = "distrobox-create --root";
#distrobox-list = "distrobox-list --root";
};
bashrcExtra = '' bashrcExtra = ''
${pkgs.pfetch}/bin/pfetch''; ${pkgs.pfetch}/bin/pfetch'';
@ -52,19 +52,11 @@
autosuggestion.enable = true; autosuggestion.enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
shellAliases = { shellAliases = shellAliases;
ls = "${pkgs.eza}/bin/eza --icons";
ll = "${pkgs.eza}/bin/eza -alh --icons"; initExtra = ''
l = "${pkgs.eza}/bin/eza -lh --icons=auto"; ${pkgs.pfetch}/bin/pfetch
tree = "${pkgs.eza}/bin/eza --tree --icons"; set -o emacs'';
open = "rifle";
ip = "ip -c";
s = "kitten ssh";
diff = "diff --color";
respawn = "clear; ${pkgs.pfetch}/bin/pfetch";
mkdir = "mkdir -p";
cat = "${pkgs.bat}/bin/bat --style plain";
};
}; };
}) })
]; ];