Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to complete backquote, etc. using compsys?
- X-seq: zsh-workers 15719
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: How to complete backquote, etc. using compsys?
- Date: Tue, 28 Aug 2001 15:50:58 +0000
- In-reply-to: <3B8B6600.54A33D8E@xxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20010821204255.64C6417403@xxxxxxxxxxxxxxxxxxx> <3B84D18C.19BA712@xxxxxxxxxxx> <1010823180146.ZM25810@xxxxxxxxxxxxxxxxxxxxxxx> <3B8B6600.54A33D8E@xxxxxxxxxxx>
[Redirected to -workers]
On Aug 28, 10:36am, Oliver Kiddle wrote:
} Subject: Re: How to complete backquote, etc. using compsys?
}
} Bart Schaefer wrote:
} >
} > On Aug 23, 10:49am, Oliver Kiddle wrote:
} > }
} > } No, you didn't miss an option. The new completion system just doesn't
} > } complete the backquote. [...] At the moment, I don't think the shell
} > } code can tell if it is in $( .. )
} >
} > Yes, it can tell that it's in $(...) or `...`.
}
} compstate[quote] and compstate[quoting] indicate if it is in `...` but
} how can it tell it's in $(...)?
Hmm, at the moment perhaps it doesn't, but it could look at $LBUFFER to
find out.
} The level of nesting would also be useful.
It should be easy to add a special parameter that gives the same info
as the %_ prompt expansion. I tried ${(%):-%_} but (not surprisingly)
the parser stack isn't "live" during the execution of the completion
function.
} [...] it would be useful to have the backquote as a removable
} suffix because it is quicker to press space than backquote.
The problem is that you end up with too many layers of autoremovable
suffixes. When completing a path name within backticks, you can't
get both the trailing / on a directory name and the trailing backtick.
} Also, without multios the closing
} bracket of $(<...) should always be completed.
It would have to be an autoremovable suffix, too; `echo $(<file wc)' is
a silly example of why.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author