Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
dc57d188
Commit
dc57d188
authored
Apr 15, 2018
by
Philippe Proulx
Committed by
Marc Cornellà
Apr 15, 2018
Browse files
plugins/archlinux: add pacls, pacown, pacweb
parent
4fa4e5fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/archlinux/archlinux.plugin.zsh
View file @
dc57d188
...
@@ -117,6 +117,8 @@ alias paclsorphans='sudo pacman -Qdt'
...
@@ -117,6 +117,8 @@ alias paclsorphans='sudo pacman -Qdt'
alias
pacrmorphans
=
'sudo pacman -Rs $(pacman -Qtdq)'
alias
pacrmorphans
=
'sudo pacman -Rs $(pacman -Qtdq)'
alias
pacfileupg
=
'sudo pacman -Fy'
alias
pacfileupg
=
'sudo pacman -Fy'
alias
pacfiles
=
'pacman -Fs'
alias
pacfiles
=
'pacman -Fs'
alias
pacls
=
'pacman -Ql'
alias
pacown
=
'pacman -Qo'
if
((
$+
commands[abs]
&&
$+
commands[aur]
))
;
then
if
((
$+
commands[abs]
&&
$+
commands[aur]
))
;
then
...
@@ -169,3 +171,16 @@ function pacmansignkeys() {
...
@@ -169,3 +171,16 @@ function pacmansignkeys() {
--no-permission-warning
--command-fd
0
--edit-key
$key
--no-permission-warning
--command-fd
0
--edit-key
$key
done
done
}
}
if
((
$+
commands[xdg-open]
))
;
then
function
pacweb
()
{
pkg
=
"
$1
"
infos
=
"
$(
pacman
-Si
"
$pkg
"
)
"
if
[[
-z
"
$infos
"
]]
;
then
return
fi
repo
=
"
$(
grep
'^Repo'
<<<
"
$infos
"
|
grep
-oP
'[^ ]+$'
)
"
arch
=
"
$(
grep
'^Arch'
<<<
"
$infos
"
|
grep
-oP
'[^ ]+$'
)
"
xdg-open
"https://www.archlinux.org/packages/
$repo
/
$arch
/
$pkg
/"
&>/dev/null
}
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment