summarylogtreecommitdiffstats
path: root/0003-Parse-pwd-s-apiurl-in-zsh-completion.patch
diff options
context:
space:
mode:
Diffstat (limited to '0003-Parse-pwd-s-apiurl-in-zsh-completion.patch')
-rw-r--r--0003-Parse-pwd-s-apiurl-in-zsh-completion.patch47
1 files changed, 0 insertions, 47 deletions
diff --git a/0003-Parse-pwd-s-apiurl-in-zsh-completion.patch b/0003-Parse-pwd-s-apiurl-in-zsh-completion.patch
deleted file mode 100644
index dc45ecf2e2c5..000000000000
--- a/0003-Parse-pwd-s-apiurl-in-zsh-completion.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com>
-Date: Thu, 20 Jul 2023 15:34:43 +0300
-Subject: [PATCH] Parse pwd's apiurl in zsh completion
-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 | 16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/osc.zsh b/contrib/osc.zsh
-index 1d7c43e00c1f8f372b719c623fc20b09512f7a71..8c1148ffacdbe09e0ec127ef949e78f75c1fbd26 100644
---- a/contrib/osc.zsh
-+++ b/contrib/osc.zsh
-@@ -37,6 +37,18 @@ _osc() {
- osc_alias=internal
- fi
-
-+ if [ -s "${PWD}/.osc/_apiurl" -a -s "${osc_rc}" ]; then
-+ local osc_apiurl
-+ read osc_apiurl < "${PWD}/.osc/_apiurl"
-+ # We prefer to match an apiurl with an alias so that the project list
-+ # cache would match also when -A was passed with said alias.
-+ # If there's no alias for that api url match to use the plain apiurl instead.
-+ osc_alias=$(sed -rn '\@^\['${apiurl}'@,\@=@{\@^aliases=@{s@[^=]+=([^,]+),.*@\1@p};}' < "${osc_rc}" 2> /dev/null)
-+ if [ -z $osc_alias ] ; then
-+ osc_alias=${osc_apiurl}
-+ fi
-+ fi
-+
- if (( CURRENT > 2 )) && [[ ${words[2]} != "help" ]]; then
- # Remember the subcommand name
- local cmd=${words[2]}
-@@ -74,8 +86,8 @@ _osc() {
- fi
-
- if [[ -n "$osc_alias" ]] ; then
-- osc_projects="${osc_projects}.${osc_alias}"
-- osc_command="$osc_command -A $osc_alias"
-+ osc_projects="${osc_projects}.${osc_alias//\//_}"
-+ osc_command="$osc_command -A ${osc_alias}"
- fi
-
- _osc_update_project_list