-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbash_aliases.sh
61 lines (50 loc) · 1.25 KB
/
bash_aliases.sh
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
if [ -f .inputrc ]; then
bind -f .inputrc
fi
alias re='clear && source ~/.bashrc'
alias ..='cd ..'
alias vb="vim ~/.bash_aliases"
# Tmux
alias tl='tmux ls'
alias tr='tmux-resume'
alias trr='tmux attach-session'
# Python
alias python='python3'
alias p='python'
# distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
function tmux-resume()
{
tmux attach-session -t "$@" || tmux new -s "$@";
}
# Duplicate of PackageManagement.sh
if hash apt 2>/dev/null; then
alias update='apt update && apt upgrade'
alias install='apt install'
#alias find-package='apt list'
#alias find-package='apt search -F "%c %p %d %V"'
alias find-package='apt search'
alias uninstall='apt remove'
alias autoremove='apt autoremove'
elif hash dnf 2>/dev/null; then
alias update='dnf update'
alias install='dnf install'
alias find-package='dnf search'
#alias uninstall=''
elif hash pacman 2>/dev/null; then
alias update='pacman -Syu'
alias install='pacman -Sy'
alias find-package='pacman -Ss'
#alias uninstall=''
alias cleanup-arch='pacman -Sc'
elif hash apk 2>/dev/null; then
alias update='apk update'
alias install='apk add'
alias find-package='apk search'
#alias uninstall=''
else
echo PackageManager not detected.
fi
# Execute for every new bash
echo
neofetch
PS1="[ > ] $PS1"