Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
865d2d8a
Unverified
Commit
865d2d8a
authored
Dec 07, 2020
by
ratijas
Committed by
GitHub
Dec 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(archlinux): prevent leaking local variables (#9476)
Co-authored-by:
Marc Cornellà
<
marc.cornella@live.com
>
parent
e48be7df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
archlinux.plugin.zsh
plugins/archlinux/archlinux.plugin.zsh
+8
-10
No files found.
plugins/archlinux/archlinux.plugin.zsh
View file @
865d2d8a
...
@@ -171,8 +171,7 @@ function paclist() {
...
@@ -171,8 +171,7 @@ function paclist() {
}
}
function
pacdisowned
()
{
function
pacdisowned
()
{
emulate
-L
zsh
local
tmp db fs
tmp
=
${
TMPDIR
-/tmp
}
/pacman-disowned-
$UID
-
$$
tmp
=
${
TMPDIR
-/tmp
}
/pacman-disowned-
$UID
-
$$
db
=
$tmp
/db
db
=
$tmp
/db
fs
=
$tmp
/fs
fs
=
$tmp
/fs
...
@@ -189,15 +188,14 @@ function pacdisowned() {
...
@@ -189,15 +188,14 @@ function pacdisowned() {
}
}
function
pacmanallkeys
()
{
function
pacmanallkeys
()
{
emulate
-L
zsh
curl
-s
https://www.archlinux.org/people/
{
developers,trustedusers
}
/ |
\
curl
-s
https://www.archlinux.org/people/
{
developers,trustedusers
}
/ |
\
awk
-F
\"
'(/pgp.mit.edu/) { sub(/.*search=0x/,""); print $1}'
|
\
awk
-F
\"
'(/pgp.mit.edu/) { sub(/.*search=0x/,""); print $1}'
|
\
xargs
sudo
pacman-key
--recv-keys
xargs
sudo
pacman-key
--recv-keys
}
}
function
pacmansignkeys
()
{
function
pacmansignkeys
()
{
emulate
-L
zsh
local
key
for
key
in
$
*
;
do
for
key
in
$
@
;
do
sudo
pacman-key
--recv-keys
$key
sudo
pacman-key
--recv-keys
$key
sudo
pacman-key
--lsign-key
$key
sudo
pacman-key
--lsign-key
$key
printf
'trust\n3\n'
|
sudo
gpg
--homedir
/etc/pacman.d/gnupg
\
printf
'trust\n3\n'
|
sudo
gpg
--homedir
/etc/pacman.d/gnupg
\
...
@@ -207,13 +205,13 @@ function pacmansignkeys() {
...
@@ -207,13 +205,13 @@ function pacmansignkeys() {
if
((
$+
commands[xdg-open]
))
;
then
if
((
$+
commands[xdg-open]
))
;
then
function
pacweb
()
{
function
pacweb
()
{
pkg
=
"
$1
"
local
pkg
=
"
$1
"
infos
=
"
$(
LANG
=
C pacman
-Si
"
$pkg
"
)
"
local
infos
=
"
$(
LANG
=
C pacman
-Si
"
$pkg
"
)
"
if
[[
-z
"
$infos
"
]]
;
then
if
[[
-z
"
$infos
"
]]
;
then
return
return
fi
fi
repo
=
"
$(
grep
-m
1
'^Repo'
<<<
"
$infos
"
|
grep
-oP
'[^ ]+$'
)
"
local
repo
=
"
$(
grep
-m
1
'^Repo'
<<<
"
$infos
"
|
grep
-oP
'[^ ]+$'
)
"
arch
=
"
$(
grep
-m
1
'^Arch'
<<<
"
$infos
"
|
grep
-oP
'[^ ]+$'
)
"
local
arch
=
"
$(
grep
-m
1
'^Arch'
<<<
"
$infos
"
|
grep
-oP
'[^ ]+$'
)
"
xdg-open
"https://www.archlinux.org/packages/
$repo
/
$arch
/
$pkg
/"
&>/dev/null
xdg-open
"https://www.archlinux.org/packages/
$repo
/
$arch
/
$pkg
/"
&>/dev/null
}
}
fi
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