From 10534d485e63e26ae87469a176136d7dacf57841 Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Mon, 24 Feb 2025 16:22:11 +0100 Subject: [PATCH] Shell aliases + disable lf --- modules/hm/__basic.nix | 5 +++-- modules/hm/shell_aliases.nix | 25 +++++++++++++++++++++++++ modules/hm/zsh.nix | 2 +- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/modules/hm/__basic.nix b/modules/hm/__basic.nix index 6c83930..0993217 100644 --- a/modules/hm/__basic.nix +++ b/modules/hm/__basic.nix @@ -31,7 +31,8 @@ # ./broot.nix ./dircolors.nix ./direnv.nix - ./exa.nix + # ./exa.nix + ./lsd.nix ./fzf.nix ./git.nix ./gpg.nix @@ -39,7 +40,7 @@ ./jq.nix # ./joshuto.nix ./keychain.nix - ./lf.nix + # ./lf.nix ./man.nix # ./ntfy.nix ./shell_aliases.nix diff --git a/modules/hm/shell_aliases.nix b/modules/hm/shell_aliases.nix index f9a1694..2d176af 100644 --- a/modules/hm/shell_aliases.nix +++ b/modules/hm/shell_aliases.nix @@ -13,6 +13,31 @@ "nS" = "nix shell"; "sc" = "sudo systemctl"; "scu" = "systemctl --user"; + + + + "rm" = "rm -i"; # Remove a file + "cp" = "cp -i"; # Copy a file + "mv" = "mv -i"; # Move a file + "dud" = "du -d 1 -h"; # Display the size of files at depth 1 in current location in human-readable form + "duf*" = "du -sh"; # Display the size of files in current location in human-readable form + "t" = "tail -f"; # Shorthand for tail which outputs the last part of a file + + + "fd*" = "find . -type d -name"; # Find a directory with the given name + "ff" = "find . -type f -name"; # Find a file with the given name + "grep" = "grep --color"; # Searches for a query string + "sgrep" = "grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS}"; # Useful for searching within files + + + "h" = "history"; # Lists all recently used commands + "hgrep" = "fc -El 0 | grep"; # Searches for a word in the list of previously used commands + "help" = "man"; # Opens up the man page for a command + "p" = "ps -f"; # Displays currently executing processes + "sortnr" = "sort -n -r"; # Used to sort the lines of a text file + "unexport" = "unset"; # Used to unset an environment variable + + }; # programs.bash = { inherit shellAliases; }; # programs.zsh = { inherit shellAliases; }; diff --git a/modules/hm/zsh.nix b/modules/hm/zsh.nix index adafa55..1118834 100644 --- a/modules/hm/zsh.nix +++ b/modules/hm/zsh.nix @@ -18,7 +18,7 @@ oh-my-zsh = { enable = true; plugins = [ - "common-aliases" + # "common-aliases" "cp" "dirhistory" "git-auto-fetch"