diff options
author | Azat Bahawi <azat@bahawi.net> | 1970-01-01 03:00:00 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2022-09-20 11:51:54 +0300 |
commit | 38bab29776950ac2364ed64195b89887717c33de (patch) | |
tree | edaaf366a55dbe96d268019124536bc504c64e87 /profile/.profile.d/90_alias.sh |
Diffstat (limited to 'profile/.profile.d/90_alias.sh')
-rw-r--r-- | profile/.profile.d/90_alias.sh | 34 |
1 files changed, 34 insertions, 0 deletions
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" |