From 96ca781fb2045ff6a7c207f43b07cbe5e69fcf73 Mon Sep 17 00:00:00 2001 From: Christian Harke Date: Sat, 15 Jun 2024 12:57:36 +0200 Subject: [PATCH] Fix safety-net aliases --- home/users/christian/shell/aliases.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/home/users/christian/shell/aliases.nix b/home/users/christian/shell/aliases.nix index 0115c914..ebc268b9 100644 --- a/home/users/christian/shell/aliases.nix +++ b/home/users/christian/shell/aliases.nix @@ -11,6 +11,11 @@ ps = "ps auxf"; psg = "ps aux | grep -v grep | grep -i -e VSZ -e"; + # Safety nets + cp = "cp -i"; + mv = "mv -i"; + rm = "rm -I --preserve-root=all --one-file-system"; + # Navigating "cd.." = "cd .."; d = "dirs -v | head -10"; @@ -51,9 +56,6 @@ myip = "curl http://ipecho.net/plain; echo"; } // lib.mkIf (!stdenv.isDarwin) { # Safety nets - cp = "cp --interactive=once"; - mv = "mv --interactive=once"; - rm = "rm --interactive=once --preserve-root=all --one-file-system"; chgrp = "chgrp --preserve-root"; chmod = "chmod --preserve-root"; chown = "chown --preserve-root";