zsh-workers
 help / color / mirror / code / Atom feed
* Clearcase and filename completion
@ 2000-02-09  7:33 Felix Rosencrantz
  0 siblings, 0 replies; 3+ messages in thread
From: Felix Rosencrantz @ 2000-02-09  7:33 UTC (permalink / raw)
  To: zsh-workers

I'm seeing problems with directory and filename completion and Clearcase
elements.  Clearcase is a commercial source control system (home page:
http://www.rational.com/products/clearcase/index.jtmpl ) that uses its
own type of filesystem to represent the versions of a file.

CC has some interesting semantics.  If you search a directory (e.g. via
globbing, ls, or readdir) it will show you all the files in the directory.
For example,
        makefile main.c foo.c

But it also has an escape mechanism that allows you to jump into the version
tree of a file, which it represent as a sub-directory of the filesystem.  So,
in this example, you could look at foo.c@@/main/LATEST and that would show
you the latest version of foo.c on the "main" branch.

If you do a stat on foo.c@@/ it exists and has a type of directory. But look
at the parent directory of foo.c@@ and it doesn't list a foo.c@@, only foo.c.

Is there anyway to tell path_files to use the existing head of the filename,
if the head already exists.  So if I type "vi foo.c@@/" and then
attempt completion, zsh would check to see if foo.c@@/ exists, and if
it does, accept it, and complete files in that directory.  
It seems that the code seems to test for existence using globbing, which
fails in this case.

I looked at the man page, and looked at trace output to see what styles
are being checked, and none seemed to be what I wanted.

Old-style completion didn't have a problem with this because it just accepted
the head of the filename being completed.

-FR

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


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

* RE: Clearcase and filename completion
  2000-02-09  8:27 Sven Wischnowsky
@ 2000-02-10 12:26 ` Andrej Borsenkow
  0 siblings, 0 replies; 3+ messages in thread
From: Andrej Borsenkow @ 2000-02-10 12:26 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-workers

>
> In this case it should be enough to add another one of those `if's
> around line 278 to skip over components that match `[^/]##@@/' and then
> handle them like we handle `(.|..)/' now (line 265).
>
> Hm, I've no idea how widely used Clearcase is -- or other filesystems
> that give special semantics to certain names, making globbing fail. If
> there is a cheap way to detect the use of Clearcase I could probably
> be convinced to put that into the core. And if there are other uses
> for a style that gives a pattern to match pathname components that
> should be accepted immediatly, I could easily be convinced to add that
> (somehow that sounds useful, but I can't think of an example).
>

I'm afraid, that simply matching pattern is not enough. What's wrong with
creating directory foo@@ outside of ClearCase tree?

There is at least one more similar case - Legato Networker can export save
indexes as file system. So, if you access /save/foo/bar you will get the
latest saved version, but if you access /save/foo/bar@01.01.2000 (do not
remember exact syntax) you will get version from the January, 1st. The way
it works is much like automounter.

It means, that we must specify "pattern on files that reside on specific
filesystem". Only there are these patterns special.

How ClearCase exports it's source tree? I think, it should be something like
NFS or automounters as well.

/andrej


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

* Re: Clearcase and filename completion
@ 2000-02-09  8:27 Sven Wischnowsky
  2000-02-10 12:26 ` Andrej Borsenkow
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 2000-02-09  8:27 UTC (permalink / raw)
  To: zsh-workers


Felix Rosencrantz wrote:

> ...
> 
> Is there anyway to tell path_files to use the existing head of the filename,
> if the head already exists.  So if I type "vi foo.c@@/" and then
> attempt completion, zsh would check to see if foo.c@@/ exists, and if
> it does, accept it, and complete files in that directory.  
> It seems that the code seems to test for existence using globbing, which
> fails in this case.
> 
> I looked at the man page, and looked at trace output to see what styles
> are being checked, and none seemed to be what I wanted.

Currently there is now way to do that except by modifying _path_files
(one of the reasons for how the new completion system looks was that
we wanted to give users the chance to do that).

In this case it should be enough to add another one of those `if's
around line 278 to skip over components that match `[^/]##@@/' and then 
handle them like we handle `(.|..)/' now (line 265).

Hm, I've no idea how widely used Clearcase is -- or other filesystems
that give special semantics to certain names, making globbing fail. If 
there is a cheap way to detect the use of Clearcase I could probably
be convinced to put that into the core. And if there are other uses
for a style that gives a pattern to match pathname components that
should be accepted immediatly, I could easily be convinced to add that 
(somehow that sounds useful, but I can't think of an example).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

end of thread, other threads:[~2000-02-10 12:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-09  7:33 Clearcase and filename completion Felix Rosencrantz
2000-02-09  8:27 Sven Wischnowsky
2000-02-10 12:26 ` Andrej Borsenkow

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