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

Re: invoking compadd so that completion is for the second argument



On Jun 23,  4:26pm, Eric Smith wrote:
}
} I want to set up completion rules for the second argument
} and not the first which appears to eb the default.
} 
} How would i do this?

Could you provide an example command line to illustrate what you
intend to have happen?

For example, given a command line such as:

% roger dodger codger

Do you mean:

(1) The completion for "roger" is invoked, but the set of matches for
    "codger" is not the same as the set of matches for "dodger"; or

(2) The completion for "dodger" should be invoked (as if "roger" were
    not present) in order to generate matches for "codger"; or

(3) Some other thing entirely.

If (1), the best answer may be different if the matches for "codger"
are purely based on its position on the command line, or if they may
depend on what appears as the word in the "dodger" position.



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