1
0

Compare commits

..

2 Commits

Author SHA1 Message Date
12449788a6 zsh/git goodies
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2025-07-08 12:21:04 +03:00
3b6c18395b zsh: openwrt-related goodies
listing archives with apk-tools 3.0.0_pre20250606 is PITA
2025-07-08 12:20:59 +03:00
3 changed files with 20 additions and 0 deletions

View File

@@ -29,6 +29,7 @@
!/.config/zsh/alias/k8s.zsh
!/.config/zsh/alias/kconfig.zsh
!/.config/zsh/alias/ls.zsh
!/.config/zsh/alias/openwrt.zsh
!/.config/zsh/alias/quilt.zsh
!/.config/zsh/alias/sbuild.zsh
!/.config/zsh/alias/sudo.zsh

View File

@@ -6,6 +6,7 @@ alias gds='git diff -p --stat=200 '
alias gdu='git-dir-usage '
alias ggc='git-gc '
alias ggcf='git-gc-force '
alias gst='git status -s '
git-dir-usage() {
local gitdir x topdir
@@ -73,3 +74,7 @@ git-archive-ref() {
git-br() {
__z_git -c core.pager='cat' branch --no-abbrev "$@"
}
git-rebase-log() {
git log --format='pick %h # %s' --reverse "$@"
}

View File

@@ -0,0 +1,14 @@
#!/bin/zsh
openwrt-apk-list() {
local i w
w=$(mktemp -d) ; : "${w:?}"
for i ; do
[ -n "$i" ] || continue
find "$w/" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
find "$w/" -mindepth 1 -maxdepth 1 -exec rm -rf {} + || return
openwrt-apk extract --no-cache --no-logfile --no-network --no-check-certificate --allow-untrusted --no-chown --destination "$w" "$i"
env -C "$w" find ./ -mindepth 1 -exec ls -ldgG --color {} +
done
rm -rf "$w"
}