mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-19 17:33:16 +08:00
Compare commits
3 Commits
e48be7dfc8
...
e2f2489a66
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2f2489a66 | ||
|
|
452586e79a | ||
|
|
865d2d8a53 |
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
@ -3,3 +3,4 @@ plugins/aws/ @maksyms
|
|||||||
plugins/git-lfs/ @vietduc01100001
|
plugins/git-lfs/ @vietduc01100001
|
||||||
plugins/gitfast/ @felipec
|
plugins/gitfast/ @felipec
|
||||||
plugins/sdk/ @rgoldberg
|
plugins/sdk/ @rgoldberg
|
||||||
|
plugins/wp-cli/ @joshmedeski
|
||||||
|
|||||||
@ -171,14 +171,13 @@ 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
|
||||||
|
|
||||||
mkdir "$tmp"
|
mkdir "$tmp"
|
||||||
trap 'rm -rf "$tmp"' EXIT
|
trap 'rm -rf "$tmp"' EXIT
|
||||||
|
|
||||||
pacman -Qlq | sort -u > "$db"
|
pacman -Qlq | sort -u > "$db"
|
||||||
|
|
||||||
@ -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() {
|
|||||||
|
|
||||||
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
|
||||||
|
|||||||
@ -31,6 +31,7 @@ function work_in_progress() {
|
|||||||
|
|
||||||
# Check if main exists and use instead of master
|
# Check if main exists and use instead of master
|
||||||
function git_main_branch() {
|
function git_main_branch() {
|
||||||
|
command git rev-parse --git-dir &>/dev/null || return
|
||||||
local branch
|
local branch
|
||||||
for branch in main trunk; do
|
for branch in main trunk; do
|
||||||
if command git show-ref -q --verify refs/heads/$branch; then
|
if command git show-ref -q --verify refs/heads/$branch; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user