summarylogtreecommitdiffstats
path: root/0006-Refactor-help-text-generation-in-zsh-completition-so.patch
diff options
context:
space:
mode:
Diffstat (limited to '0006-Refactor-help-text-generation-in-zsh-completition-so.patch')
-rw-r--r--0006-Refactor-help-text-generation-in-zsh-completition-so.patch88
1 files changed, 0 insertions, 88 deletions
diff --git a/0006-Refactor-help-text-generation-in-zsh-completition-so.patch b/0006-Refactor-help-text-generation-in-zsh-completition-so.patch
deleted file mode 100644
index 9e9d3af784c9..000000000000
--- a/0006-Refactor-help-text-generation-in-zsh-completition-so.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com>
-Date: Fri, 21 Jul 2023 23:09:51 +0300
-Subject: [PATCH] Refactor help text generation in zsh completition so it can
- be reused
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
----
- contrib/osc.zsh | 42 ++++++++++++++++--------------------------
- 1 file changed, 16 insertions(+), 26 deletions(-)
-
-diff --git a/contrib/osc.zsh b/contrib/osc.zsh
-index 244a23556e9b8179c8de711ad6a00a866759ed42..f6e1978c2abaf5dde5ec3e8ee598290bab476046 100644
---- a/contrib/osc.zsh
-+++ b/contrib/osc.zsh
-@@ -181,12 +181,16 @@ _osc_cmd_buildlog() {
- }
-
- _osc_cmd_submitreq() {
-+ _osc_complete_help_commands 'options' 'option'
-+}
-+
-+_osc_complete_help_commands() {
- local hline
- local -a cmdlist
- local tag=0
- _call_program help-commands osc help $cmd | while read -A hline; do
- # start parsing from "usage:"
-- [[ $hline[1] = "usage:" ]] && tag=1
-+ [[ $hline[1] = "${1}:" ]] && tag=1
- [[ $tag = 0 ]] && continue
-
- if [[ $hline[1] =~ ^osc ]]; then
-@@ -198,40 +202,26 @@ _osc_cmd_submitreq() {
-
- (( ${#hline} < 2 )) && continue
-
-- cmdlist=($cmdlist "${hline[1]%,}:${hline[2,-1]}")
-+ cmdlist=($cmdlist "${hline[1]%,}:${hline[2,-1]}")
-
- done
--
-- _describe -t osc-commands 'osc command' cmdlist
--}
-
-+ if [ -n "$cmdlist" ] ; then
-+ _describe -t osc-commands "osc $2" cmdlist
-+ else
-+ return 1
-+ fi
-+}
-
- _osc_cmd_do() {
-- local hline
-- local -a cmdlist
-- local tag=0
--
- # only start completion if there's some '-' on the line
- if ! [ "$words[2]" = "-" ]; then
-- _complete
-- return
-+ _complete
-+ return
- fi
-
-- _call_program help-commands osc help $cmd | while read -A hline; do
-- # start parsing from "Options:"
-- [[ $hline[1] = "Options:" ]] && tag=1
-- [[ $tag = 0 ]] && continue
-- # Option has to start with a '-'
-- [[ $hline[1] =~ ^- ]] || continue
-- (( ${#hline} < 2 )) && continue
--
-- cmdlist=($cmdlist "${hline[1]%,}:${hline[2,-1]}")
-- done
--
-- if [ -n "$cmdlist" ]; then
-- _describe -t osc-commands 'osc command' cmdlist
-- else
-- _complete
-+ if ! _osc_complete_help_commands 'options' 'option'; then
-+ _complete
- fi
- }
-