about summary refs log tree commit diff
path: root/profile/.profile.d/90_alias.sh
blob: 39dc36449f99e543c4886886a3bae54353a2b07f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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"

Consider giving Nix/NixOS a try! <3