zsh-workers
 help / color / mirror / code / Atom feed
* get _files to work/bug in subversion in completion
@ 2005-07-09  6:07 Itai Seggev
  2005-07-09 17:49 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Itai Seggev @ 2005-07-09  6:07 UTC (permalink / raw)
  To: zsh-workers


I would like to get zsh to provide me with file completion if the
_complete fails to find anything. According to

http://zsh.sourceforge.net/FAQ/zshfaq04.html#l50

all I need to do is add _files to the end of my completion list.
Thus, I use

zstyle ':completion:*::::' completer _complete _ignored _files

but this doesn't seem to change anything. By analogy with the suggestion in

http://www.zsh.org/mla/users//2004/msg01039.html

I try to define a _complete_first command

_complete_first() {
  _complete "$@"
  return 1
}
zstyle ':completion:*::::' completer _complete_first _files _ignored

to force _files to always run. This makes files appear alongside
arguments, but there no files appear in the situations where
completion fails.

In particular, if I do a

svn ci -F [tab]

to try to get a list of of possible files to use as my changelog, zsh
never completes anything. I think this is a bug...
--
Itai

Itai Seggev, University of Chicago, Department of Physics

In 1997 a group of programmers started writing a desktop environment
to fix a travesty they didn't create.  Their program promptly found
its way onto un*x systems everywhere. Today, still opposed by a
software monopolist, they survive as soldiers of fortune.  If you share
their vision, if you know you can help, and if you can connect to
internet, maybe you can join... the K-Team.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: get _files to work/bug in subversion in completion
  2005-07-09  6:07 get _files to work/bug in subversion in completion Itai Seggev
@ 2005-07-09 17:49 ` Bart Schaefer
  2005-07-09 21:27   ` Itai Seggev
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2005-07-09 17:49 UTC (permalink / raw)
  To: Itai Seggev, zsh-workers

On Jul 8, 11:07pm, Itai Seggev wrote:
} 
} In particular, if I do a
} 
} svn ci -F [tab]
} 
} to try to get a list of of possible files to use as my changelog, zsh
} never completes anything. I think this is a bug...

It's a bug in _subversion, I think.

Try adding

   local ret=1

somewhere near the top of the function _svn_subcommand in the file
Completion/Unix/Command/_subversion and see if that fixes it.  Or better
yet, delete

       && ret=0

   return ret

from the end of that function, leaving just the _arguments call.  The
same goes for _svnadmin_subcommand, for that matter.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: get _files to work/bug in subversion in completion
  2005-07-09 17:49 ` Bart Schaefer
@ 2005-07-09 21:27   ` Itai Seggev
  0 siblings, 0 replies; 3+ messages in thread
From: Itai Seggev @ 2005-07-09 21:27 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

On Sat, 9 Jul 2005, Bart Schaefer wrote:

> On Jul 8, 11:07pm, Itai Seggev wrote:
> }
> } In particular, if I do a
> }
> } svn ci -F [tab]
> }
> } to try to get a list of of possible files to use as my changelog, zsh
> } never completes anything. I think this is a bug...
>
> It's a bug in _subversion, I think.
>
> Try adding
>
>    local ret=1
>
> somewhere near the top of the function _svn_subcommand in the file
> Completion/Unix/Command/_subversion and see if that fixes it.  Or better
> yet, delete
>
>        && ret=0
>
>    return ret
>
> from the end of that function, leaving just the _arguments call.  The
> same goes for _svnadmin_subcommand, for that matter.

I tried both of these solutions. (I assume that all I had to do was edit
the files and then ssh in to make use of the new definitions.) Neither
seemed to have any effect. Other suggestions?

--
Itai

Itai Seggev, University of Chicago, Department of Physics

In 1997 a group of programmers started writing a desktop environment
to fix a travesty they didn't create.  Their program promptly found
its way onto un*x systems everywhere. Today, still opposed by a
software monopolist, they survive as soldiers of fortune.  If you share
their vision, if you know you can help, and if you can connect to
internet, maybe you can join... the K-Team.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-07-09 21:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-09  6:07 get _files to work/bug in subversion in completion Itai Seggev
2005-07-09 17:49 ` Bart Schaefer
2005-07-09 21:27   ` Itai Seggev

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).