Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: completion on brace + 4 characters doesn't work



On 2011-04-29 02:31:49 +0200, Vincent Lefevre wrote:
> On 2011-04-29 00:27:54 +0200, Vincent Lefevre wrote:
> > I've looked at Debian's patches for the zsh package, but I don't
> > see anything related to the problem here.
> 
> I have recompiled the official zsh 4.3.11 under Debian, and have the
> same problem with it.

I've done a strace in both cases.

With "echo ./{abc[TAB]", I get:

[...]
16059 stat("/home/vlefevre/zsh-test/share/zsh/site-functions.zwc", 0x7fff7a4b17f0) = -1 ENOENT (No such file or directory)
16059 stat("/home/vlefevre/zsh-test/share/zsh/site-functions/_have_glob_qual.zwc", 0x7fff7a4b1760) = -1 ENOENT (No such file or directory)
16059 stat("/home/vlefevre/zsh-test/share/zsh/site-functions/_have_glob_qual", 0x7fff7a4b16d0) = -1 ENOENT (No such file or directory)
16059 access("/home/vlefevre/zsh-test/share/zsh/site-functions/_have_glob_qual", R_OK) = -1 ENOENT (No such file or directory)
16059 stat("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions.zwc", 0x7fff7a4b17f0) = -1 ENOENT (No such file or directory)
16059 stat("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_have_glob_qual.zwc", 0x7fff7a4b1760) = -1 ENOENT (No such file or directory)
16059 stat("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_have_glob_qual", {st_mode=S_IFREG|0644, st_size=858, ...}) = 0
16059 access("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_have_glob_qual", R_OK) = 0
16059 open("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_have_glob_qual", O_RDONLY|O_NOCTTY) = 3
16059 lseek(3, 0, SEEK_END)             = 858
16059 lseek(3, 0, SEEK_SET)             = 0
16059 read(3, "#autoload\n\n# Test if $1 has glob"..., 858) = 858
16059 close(3)                          = 0
[...]
16059 open("/dev/null", O_WRONLY|O_CREAT|O_NOCTTY|O_TRUNC, 0666) = 3
16059 fcntl(2, F_DUPFD, 10)             = 12
16059 close(2)                          = 0
16059 dup2(3, 2)                        = 2
16059 close(3)                          = 0
16059 open("./", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
16059 getdents(3, /* 3 entries */, 32768) = 80
16059 getdents(3, /* 0 entries */, 32768) = 0
16059 close(3)                          = 0
16059 dup2(12, 2)                       = 2
16059 close(12)                         = 0
[...]
16059 stat("/home/vlefevre/zsh-test/share/zsh/site-functions.zwc", 0x7fff7a4b0240) = -1 ENOENT (No such file or directory)
16059 stat("/home/vlefevre/zsh-test/share/zsh/site-functions/_list_files.zwc", 0x7fff7a4b01b0) = -1 ENOENT (No such file or directory)
16059 stat("/home/vlefevre/zsh-test/share/zsh/site-functions/_list_files", 0x7fff7a4b0120) = -1 ENOENT (No such file or directory)
16059 access("/home/vlefevre/zsh-test/share/zsh/site-functions/_list_files", R_OK) = -1 ENOENT (No such file or directory)
16059 stat("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions.zwc", 0x7fff7a4b0240) = -1 ENOENT (No such file or directory)
16059 stat("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_list_files.zwc", 0x7fff7a4b01b0) = -1 ENOENT (No such file or directory)
16059 stat("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_list_files", {st_mode=S_IFREG|0644, st_size=1420, ...}) = 0
16059 access("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_list_files", R_OK) = 0
16059 open("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_list_files", O_RDONLY|O_NOCTTY) = 3
16059 lseek(3, 0, SEEK_END)             = 1420
16059 lseek(3, 0, SEEK_SET)             = 0
16059 read(3, "#autoload\n\n# Helper function for"..., 1420) = 1420
16059 close(3)                          = 0
[...]
16059 lstat("./abcdef", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
16059 stat("./abcdef", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
[...]

With "echo ./{abcd[TAB]", I get:

[...]
16063 stat("/home/vlefevre/zsh-test/share/zsh/site-functions.zwc", 0x7fffd1930340) = -1 ENOENT (No such file or directory)
16063 stat("/home/vlefevre/zsh-test/share/zsh/site-functions/_have_glob_qual.zwc", 0x7fffd19302b0) = -1 ENOENT (No such file or directory)
16063 stat("/home/vlefevre/zsh-test/share/zsh/site-functions/_have_glob_qual", 0x7fffd1930220) = -1 ENOENT (No such file or directory)
16063 access("/home/vlefevre/zsh-test/share/zsh/site-functions/_have_glob_qual", R_OK) = -1 ENOENT (No such file or directory)
16063 stat("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions.zwc", 0x7fffd1930340) = -1 ENOENT (No such file or directory)
16063 stat("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_have_glob_qual.zwc", 0x7fffd19302b0) = -1 ENOENT (No such file or directory)
16063 stat("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_have_glob_qual", {st_mode=S_IFREG|0644, st_size=858, ...}) = 0
16063 access("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_have_glob_qual", R_OK) = 0
16063 open("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_have_glob_qual", O_RDONLY|O_NOCTTY) = 3
16063 lseek(3, 0, SEEK_END)             = 858
16063 lseek(3, 0, SEEK_SET)             = 0
16063 read(3, "#autoload\n\n# Test if $1 has glob"..., 858) = 858
16063 close(3)                          = 0
[...]
16063 open("/dev/null", O_WRONLY|O_CREAT|O_NOCTTY|O_TRUNC, 0666) = 3
16063 fcntl(2, F_DUPFD, 10)             = 12
16063 close(2)                          = 0
16063 dup2(3, 2)                        = 2
16063 close(3)                          = 0
16063 open("./", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
16063 getdents(3, /* 3 entries */, 32768) = 80
16063 getdents(3, /* 0 entries */, 32768) = 0
16063 close(3)                          = 0
16063 dup2(12, 2)                       = 2
16063 close(12)                         = 0
[...]
16063 access("./acdd", F_OK)            = -1 ENOENT (No such file or directory)
[...]
16063 stat("/home/vlefevre/zsh-test/share/zsh/site-functions.zwc", 0x7fffd193ab60) = -1 ENOENT (No such file or directory)
16063 stat("/home/vlefevre/zsh-test/share/zsh/site-functions/_ignored.zwc", 0x7fffd193aad0) = -1 ENOENT (No such file or directory)
16063 stat("/home/vlefevre/zsh-test/share/zsh/site-functions/_ignored", 0x7fffd193aa40) = -1 ENOENT (No such file or directory)
16063 access("/home/vlefevre/zsh-test/share/zsh/site-functions/_ignored", R_OK) = -1 ENOENT (No such file or directory)
16063 stat("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions.zwc", 0x7fffd193ab60) = -1 ENOENT (No such file or directory)
16063 stat("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_ignored.zwc", 0x7fffd193aad0) = -1 ENOENT (No such file or directory)
16063 stat("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_ignored", {st_mode=S_IFREG|0644, st_size=1647, ...}) = 0
16063 access("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_ignored", R_OK) = 0
16063 open("/home/vlefevre/zsh-test/share/zsh/4.3.11/functions/_ignored", O_RDONLY|O_NOCTTY) = 3
16063 lseek(3, 0, SEEK_END)             = 1647
16063 lseek(3, 0, SEEK_SET)             = 0
16063 read(3, "#autoload\n\n# Use ignored matches"..., 1647) = 1647
16063 close(3)                          = 0
[...]

The question is why this access("./acdd", F_OK) in the latter case?

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)



Messages sorted by: Reverse Date, Date, Thread, Author