From 38bab29776950ac2364ed64195b89887717c33de Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Thu, 1 Jan 1970 03:00:00 +0300 Subject: chore: init --- profile/.profile.d/90_alias.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 profile/.profile.d/90_alias.sh (limited to 'profile/.profile.d/90_alias.sh') diff --git a/profile/.profile.d/90_alias.sh b/profile/.profile.d/90_alias.sh new file mode 100644 index 0000000..39dc364 --- /dev/null +++ b/profile/.profile.d/90_alias.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +if cp --help | grep -q "\--progress-bar" 2>&1 >/dev/null; then + alias cp="cp -i -r -g" +else + alias cp="cp -i -r" +fi + +if mv --help | grep -q "\--progress-bar" 2>&1 >/dev/null; then + alias mv="mv -i -g" +else + alias mv="mv -i" +fi + +if rm --help | grep -q "\--interactive\[=WHEN\]" 2>&1 >/dev/null; then + alias rm="rm -I" +else + alias rm="rm -i" +fi + +alias c="cd" + +alias ln="ln -i" + +alias mkdir="mkdir -p" +alias rmdir="rmdir -p" + +alias grep="grep --color=auto" +alias egrep="egrep --color=auto" +alias fgrep="fgrep --color=auto" + +alias du="du -h" + +alias df="df -h" -- cgit 1.4.1