On Sat, Feb 01, 2003 at 09:22:27PM -0800, Vineet Kumar wrote:
> * will trillich ([EMAIL PROTECTED]) [030201 20:11]:
> >                     <== blank line, here>
> >     Unmatched `.
> >     all up-to-date
> >                     <== blank line, again>
> >     Hit ENTER or type command to continue
> 
> <snip>
> 
> > (i did recently change my tcsh "complete" pattern for make:
> > 
> >     % complete make
> >     'n/-f/f/' 'p@*@`perl -ne 'if (/^([^\s#.][-\w.%]+)\s*:/) {print "$1 "}' 
>Makefile`@'
> 
> Well, I don't know my tcsh, but it looks to me like you probably want
> something like this instead:
> 
> 'n/-f/f/' 'p@*@`perl -ne \'if (/^([^\s#.][-\w.%]+)\s*:/) {print "$1 "}\' Makefile`@'
> 
> (note the escaped ticks)

dang. good eye. it took me hours to find that.

complete make    'n/-f/f/' 'p@*@`perl -ne \'if (/^([^\s#.][-\w.%]+)\s*:/) {print "$1 
"}\' Makefile`@'

> But again, I don't know anything about tcsh completions.
> 
> > but surely that's unrelated...)
> 
> Why do you think it's unrelated?  It's the only place you're using any
> backticks, right?

the only place? in *nix, how can we ever be sure there's no hook
to somewhere else? this completion stuff is a prime example --
press tab when entering a command and poof, you may run a perl
script! sheesh--

but no, the tcsh completions only come into play when i'm *at*
the tcsh shell, type part of a command, then press tab:

        % make<space><tab>
        all               degrees.sql.out   org.sql.out       projects.sql.out  
states.sql.out    
        clean             email.sql.out     person.sql.out    realclean         
team.sql.out      
        dates.sql.out     empl.sql.out      person.sql.out    relations.sql.out 
web_pages.sql.out 
        default           loc.sql.out       phone.sql.out     %.sql.out         

those are items listed in the makefile, not necessarily files in
the current directory. (waaaay cool!) not related to vi.

of course, the problem wasn't related to vi per se -- it was vi
spawns a subshell to carry out the "make" command.

so the trouble was actually elsewhere. i'd recently munged a
startup script (called from ~/.cshrc) and i'd left a messy
fingerprint in there.

by coincidence, it happened to be the completion area, tho not
the makefile completion -- rather the one for kill|fg|bg which
i've since fixed:

complete {kill,fg,bg} 'c/%/j/' 'c/-/S/' 'p/*/`ps T | grep -v "\<TTY\>" | awk \'{print 
$1}\'`/'

small world (or at least small shell) eh?

-- 
I use Debian/GNU Linux version 3.0;
Linux server 2.4.20-k6 #1 Mon Jan 13 23:49:14 EST 2003 i586 unknown
 
DEBIAN NEWBIE TIP #4 from Will Trillich <[EMAIL PROTECTED]>
:
Want to know WHAT FILES ARE PROVIDED BY PACKAGE x-y-z? This is a
job for dpkg: enter "dpkg -L <package-name>" at the command
prompt.  Try "dpkg -L netbase | pager" for example.

Also see http://newbieDoc.sourceForge.net/ ...


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to