Thread View: gnu.bash.bug
1 messages
1 total messages
Started by James J Dempsey
Tue, 25 Jul 1989 13:52
completion on sockets
Author: James J Dempsey
Date: Tue, 25 Jul 1989 13:52
Date: Tue, 25 Jul 1989 13:52
30 lines
1179 bytes
1179 bytes
I'm running on a Sun 3/60, Sun OS 4.0.3, compiled with cc and yacc.
A minor nit:
Asking bash to complete on a socket in the file system (like
/tmp/.X11-unix/X0 if you run X) will result in bash thinking the
socket is a directory:
$ ls /tmp/.X11-unix/X0/
The offending piece of code in readline.c looks like this:
if ((stat (filename, &finfo) == 0) &&
(finfo.st_mode & S_IFDIR))
{
if (the_line[rl_point] != '/')
rl_insert_text ("/");
}
else
Since S_IFDIR (on Sun OS) is 0040000 and S_IFSOCK is 0140000 I guess
the only thing to do is to check if st_mode is S_IFDIR and *not*
S_IFSOCK.
--Jim Dempsey--
BBN Communications
jjd@bbn.com (ARPA Internet)
..!{decvax, harvard, wjh12, linus}!bbn!jjd
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads