-
Notifications
You must be signed in to change notification settings - Fork 0
/
pacman_aliases.fish
61 lines (54 loc) · 1.49 KB
/
pacman_aliases.fish
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
# Alias for installing packages without confirmation
function ass
sudo pacman --noconfirm -S $argv
end
complete -c ass -w 'pacman --noconfirm -S' -a '(pacman -Slq)'
# Alias for searching packages
function sss
sudo pacman -Ss $argv
end
complete -c sss -w 'pacman -Ss' -a '(pacman -Slq)'
# Alias for showing package information
function ssss
sudo pacman -Si $argv
end
complete -c ssss -w 'pacman -Si' -a '(pacman -Slq)'
# -----------syu alias changed below
# Alias for system update
#function syu
# sudo pacman -Syu
#end
#complete -c syu -w 'pacman -Syu'
# Alias for a complete system update on Manjaro
function syu
# Update system packages with pacman
sudo pacman -Syu
# Update AUR packages with yay
yay -Syu --noconfirm
# Update snap packages
if type -q snap
echo "Updating snap packages..."
sudo snap refresh
end
# Update flatpak packages
if type -q flatpak
echo "Updating flatpak packages..."
flatpak update -y
end
end
complete -c syu -w 'pacman -Syu; yay -Syu --noconfirm; snap refresh; flatpak update -y'
# --------- syu alias changed above
# Alias for removing packages with dependencies
function rns
sudo pacman -Rns $argv
end
complete -c rns -w 'pacman -Rns' -a '(pacman -Qq)'
# Alias for editing files with sudo nano
function nano
sudo nano $argv
end
complete -c nano -f -a '(__fish_complete_path)'
# Alias for creating a directory and cd into it
function mkcd
mkdir -p $argv[1] && cd $argv[1]
end