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

Completing within colon separated paths



[ ZSH_VERSION is 4.0.1-pre-2 ]

Is there a way to have TAB complete '/usr/local' from the X (marking cursor
position) in the following:

  $ .:/home/jsc/bin:/usr/locX:/sbin:/usr/sbin:/usr/java/jdk1.3/bin

Using expand-or-complete-prefix mimics temporary insertion of a space at the
cursor position, but it seems the colon at the start of the path component
prevents the recognition for filename completion.  I've tried dabbling with
WORDCHARS, but suspect this is not the right approach...

Interestingly, when I use `vared PATH', expand-or-complete-prefix does actually
complete path components.  So what needs to be done to have the same behavior
when editing PATH "directly" on the cmd line (i.e., without `vared')?

[`vared' might not always be the way to go, e.g., when passing -classpath, plus
 several other args, to a JVM.]

Thanks,

    --- John



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