Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] base-files: add zsh completions for vkpurge
Date: Sat, 10 Feb 2024 19:35:09 +0100	[thread overview]
Message-ID: <20240210183509.420F825862@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-48638@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages vkpurge-zsh-comp
https://github.com/void-linux/void-packages/pull/48638

base-files: add zsh completions for vkpurge
completes subcommands, versions and all for `rm`, and says it expects a version glob for `list` (without completing anything because that would be hard)

#### Testing the changes
- I tested the changes in this PR: **YES**


A patch file from https://github.com/void-linux/void-packages/pull/48638.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-vkpurge-zsh-comp-48638.patch --]
[-- Type: text/x-diff, Size: 1880 bytes --]

From 1c575371f3559e0ebad36908d5bc5be705f51f54 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 10 Feb 2024 02:56:34 -0500
Subject: [PATCH] base-files: update to 0.144

adds zsh completions for vkpurge
---
 srcpkgs/base-files/files/_vkpurge | 34 +++++++++++++++++++++++++++++++
 srcpkgs/base-files/template       |  5 +++--
 2 files changed, 37 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/base-files/files/_vkpurge

diff --git a/srcpkgs/base-files/files/_vkpurge b/srcpkgs/base-files/files/_vkpurge
new file mode 100644
index 0000000000000..b98dcf56e8c7e
--- /dev/null
+++ b/srcpkgs/base-files/files/_vkpurge
@@ -0,0 +1,34 @@
+#compdef vkpurge
+
+local context state state_descr line
+typeset -A opt_args
+local curcontext="$curcontext"
+
+_arguments -C \
+	'1: :->subcmd' \
+	'*:: :->kernels'
+
+case "$state" in
+subcmd)
+	local subcommands=(
+		'list:List removable kernel versions'
+		'rm:Remove removable kernel versions'
+	)
+	_describe -t commands subcommand subcommands
+	;;
+kernels)
+	curcontext="${curcontext%:*:*}:vkpurge-$line[1]:"
+	case "$line[1]" in
+	list)
+		_arguments '1::version glob: '
+		;;
+	rm)
+		local kernels=(
+			'all:All removable kernels'
+			$(vkpurge list all)
+		)
+		_describe -t kernels kernel kernels
+		;;
+	esac
+	;;
+esac
diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template
index c9db827fe55b4..64e756be34dee 100644
--- a/srcpkgs/base-files/template
+++ b/srcpkgs/base-files/template
@@ -1,7 +1,7 @@
 # Template file for 'base-files'
 pkgname=base-files
-version=0.143
-revision=4
+version=0.144
+revision=1
 bootstrap=yes
 depends="xbps-triggers"
 short_desc="Void Linux base system files"
@@ -84,6 +84,7 @@ do_install() {
 	# vkpurge
 	vbin ${FILESDIR}/vkpurge
 	vman ${FILESDIR}/vkpurge.8
+	vcompletion "${FILESDIR}"/_vkpurge zsh vkpurge
 
 	vbin ${FILESDIR}/lsb_release
 

  parent reply	other threads:[~2024-02-10 18:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-10  8:00 [PR PATCH] " classabbyamp
2024-02-10  8:02 ` [PR PATCH] [Updated] " classabbyamp
2024-02-10 16:33 ` 0x5c
2024-02-10 17:43 ` [PR REVIEW] " kymnob
2024-02-10 17:43 ` kymnob
2024-02-10 17:43 ` kymnob
2024-02-10 17:43 ` kymnob
2024-02-10 17:43 ` kymnob
2024-02-10 17:43 ` kymnob
2024-02-10 17:43 ` kymnob
2024-02-10 17:43 ` kymnob
2024-02-10 18:35 ` classabbyamp [this message]
2024-02-10 19:07 ` kymnob
2024-02-10 19:07 ` kymnob
2024-02-10 19:08 ` [PR PATCH] [Updated] " classabbyamp
2024-02-12 16:42 ` [PR PATCH] [Merged]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240210183509.420F825862@inbox.vuxu.org \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).