1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00

44948: _subversion: Make _svn_controlled offer everything rather than nothing.

This commit is contained in:
Daniel Shahaf 2019-11-29 01:45:19 +00:00
parent a4f5c345c8
commit dae3e135d8
2 changed files with 20 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2019-11-29 Daniel Shahaf <d.s@daniel.shahaf.name>
* 44948: Completion/Unix/Command/_subversion: Make
_svn_controlled offer everything rather than nothing.
* 44947: Completion/Unix/Command/_subversion: Complete the
'auth', 'changelist', 'patch', 'resolve', and 'x-unshelve'
subcommands.

View file

@ -128,7 +128,7 @@ _svn () {
case $cmd in;
(add)
args+=(
'*:file:_files -g "*(^e:_svn_controlled:)"'
'*:file:_files -g "*(e:_svn_uncontrolled:)"'
)
;;
(auth)
@ -350,7 +350,22 @@ _svnadmin () {
(( $+functions[_svn_controlled] )) ||
_svn_controlled() {
[[ -f ${(M)REPLY##*/}.svn/text-base/${REPLY##*/}.svn-base ]]
# For svn<=1.6, this was implemented as:
# [[ -f ${(M)REPLY##*/}.svn/text-base/${REPLY##*/}.svn-base ]]
# However, because that implementation returns false for all files on svn>=1.7, and
# because 1.6 has been deprecated for 8 years and EOL for 6 years, we opt to DTRT
# for >=1.7. Therefore:
# TODO: Reimplement this function and _svn_uncontrolled for svn>=1.7.
# (Use 'svn st' or 'svn info', not 'svn ls')
return 0
}
(( $+functions[_svn_uncontrolled] )) ||
_svn_uncontrolled() {
# TODO: See comments in _svn_controlled
return 0
}
(( $+functions[_svn_conflicts] )) ||