]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - shell/aliases.in
shell/aliases: Run `unalias` for mv and cp.
[config/dotfiles.git] / shell / aliases.in
index 27ce92c8b9b7252bd3b7cbeab310135d28bd790e..8bf77c456a410c2fb85c5bc595c7a332be8f817b 100644 (file)
@@ -29,6 +29,16 @@ alias s=mpc  # s for sound, m is already used
 alias v=vim
 
 
+unalias mv cp 2> /dev/null
+# Ask for confirmation before overwriting files. Especially useful when moving
+# to a different directory. No alias for `rm` because I specify the files to
+# remove directly, so I know what will happen.
+alias mv='mv -i'
+# Additionally preserve all file attributes when copying, this includes
+# copying symbolic links as is without dereferencing them.
+alias cp='cp -i -a'
+
+
 # Make sure there is no alias named ls as it causes problems with the
 # following ls function on (at least) bash 4.0.35.
 unalias ls 2> /dev/null