From: Cristiano De Michele <cristiano.demichele@uniroma1.it>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: Cristiano De Michele <cristiano.demichele@uniroma1.it>,
zsh-users@zsh.org
Subject: Re: subversion complete functions obsolete
Date: Sun, 25 Aug 2019 11:46:49 +0200 [thread overview]
Message-ID: <554D7DB9-FBB7-4311-ABC4-FB29E1F8F710@uniroma1.it> (raw)
In-Reply-To: <bfb30924-2b36-4d99-b8ba-674eb280c5e0@www.fastmail.com>
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
Dear Daniel,
attached you can find the diff file which you requested,
cheers C.
____________
Cristiano De Michele, Ph.D.
Department of Physics Tel. : +390649913524
University of Rome "La Sapienza" Fax : +39064463158
Piazzale Aldo Moro, 2
I-00185 Roma - Italy
homepage: http://www.roma1.infn.it/~demichel <http://www.roma1.infn.it/~demichel/>
> Il giorno 24 ago 2019, alle ore 23:56, Daniel Shahaf <d.s@daniel.shahaf.name> ha scritto:
>
> Cristiano De Michele wrote on Sat, 24 Aug 2019 21:41 +00:00:
>> attached you can find the diff file which you requested,
>
> Thanks! Yes, that's the right form to use in the future.
>
[-- Attachment #2.1: Type: text/html, Size: 409 bytes --]
[-- Attachment #2.2: subversion_patch.txt --]
[-- Type: text/plain, Size: 3473 bytes --]
--- _subversion_original_zsh_5.7.1 2019-08-24 09:54:06.000000000 +0200
+++ _subversion_orthogonal 2019-08-24 22:10:57.000000000 +0200
@@ -1,5 +1,9 @@
#compdef svn svnlite=svn svnadmin svnadmin-static=svnadmin
+# This is the file provided by zsh 5.7.1 patched in such a way that I removed from all the calls
+# to _file zsh function the option -g and the relative argument, thus making completion less smart
+# with compared to original version.
+
_svn () {
local curcontext="$curcontext" state line expl ret=1
typeset -A opt_args
@@ -106,23 +110,23 @@
case $cmd in;
(add)
args+=(
- '*:file:_files -g "*(^e:_svn_controlled:)"'
+ '*:file:_files'
)
;;
(commit)
args=(
${args/(#b)(*--file*):arg:/$match[1]:file:_files}
- '*:file:_files -g "*(e:_svn_status:)"'
+ '*:file:_files'
)
;;
(delete)
args+=(
- '*:file:_files -g ".svn(/e:_svn_deletedfiles:)"'
+ '*:file:_files'
)
;;
(diff)
args+=(
- '*: : _alternative "files:file:_files -g \*\(e:_svn_status:\)" "urls:URL:_svn_urls"'
+ '*: : _alternative "files:file:_files" "urls:URL:_svn_urls"'
)
;;
(help)
@@ -138,8 +142,8 @@
;;
(log)
args+=(
- '1: : _alternative "files:file:_files -g \*\(e:_svn_controlled:\)" "urls:URL:_svn_urls"'
- '*:file:_files -g "*(e:_svn_controlled:)"'
+ '1: : _alternative "files:file:_files" "urls:URL:_svn_urls"'
+ '*:file:_files'
)
;;
(mergeinfo)
@@ -161,12 +165,12 @@
;;
(resolved)
args+=(
- '*:file:_files -g "*(e:_svn_conflicts:)"'
+ '*:file:_files'
)
;;
(revert)
args+=(
- '*:file:_files -g "(.svn|*)(/e:_svn_deletedfiles:,e:_svn_status:)"'
+ '*:file:_files'
)
;;
(unshelve)
@@ -308,44 +312,6 @@
return ret
}
-(( $+functions[_svn_controlled] )) ||
-_svn_controlled() {
- [[ -f ${(M)REPLY##*/}.svn/text-base/${REPLY##*/}.svn-base ]]
-}
-
-(( $+functions[_svn_conflicts] )) ||
-_svn_conflicts() {
- [ -n $REPLY.(mine|r<->)(N[1]) ]
-}
-
-(( $+functions[_svn_deletedfiles] )) ||
-_svn_deletedfiles() {
- # Typical usage would be _files -g '.svn(/e:_svn_deletedfiles:)'
- local cont controlled
- reply=( )
- [[ $REPLY = (*/|).svn ]] || return
- controlled=( $REPLY/text-base/*.svn-base(N:r:t) )
- for cont in ${controlled}; do
- [[ -e $REPLY:h/$cont ]] || reply+=( ${REPLY%.svn}$cont )
- done
-}
-
-(( $+functions[_svn_status] )) ||
-_svn_status() {
- local dir=$REPLY:h
- local pat="${1:-([ADMR~]|?M)}"
-
- zmodload -F zsh/stat b:zstat 2>/dev/null
- local key="$(zstat +device $dir):$(zstat +inode $dir)"
- local mtime="$(zstat +mtime $dir/.svn/entries)"
-
- if (( ! $+_cache_svn_status[$key] || _cache_svn_mtime[$key] != mtime )); then
- _cache_svn_status[$key]="$(_call_program files svn status -N $dir)"
- _cache_svn_mtime[$key]="$mtime"
- fi
-
- (( ${(M)#${(f)_cache_svn_status[$key]}:#(#s)${~pat}*$REPLY} ))
-}
(( $+functions[_svn_remote_paths] )) ||
_svn_remote_paths() {
[-- Attachment #2.3: Type: text/html, Size: 3471 bytes --]
next prev parent reply other threads:[~2019-08-25 9:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-23 16:38 Cristiano De Michele
2019-08-24 17:24 ` Daniel Shahaf
2019-08-24 20:25 ` Cristiano De Michele
2019-08-24 21:16 ` Daniel Shahaf
[not found] ` <35D00560-E05B-40F1-B581-43BAAC418C32@uniroma1.it>
[not found] ` <bfb30924-2b36-4d99-b8ba-674eb280c5e0@www.fastmail.com>
2019-08-25 9:46 ` Cristiano De Michele [this message]
2019-08-26 14:23 ` Daniel Shahaf
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=554D7DB9-FBB7-4311-ABC4-FB29E1F8F710@uniroma1.it \
--to=cristiano.demichele@uniroma1.it \
--cc=d.s@daniel.shahaf.name \
--cc=zsh-users@zsh.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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).