tcsh-org / tcsh

This is a read-only mirror of the tcsh code repository.
https://www.tcsh.org/
Other
238 stars 42 forks source link

complete the words that contain spaces #83

Open sigoden opened 10 months ago

sigoden commented 10 months ago

Recently, I've been preparing to add tcsh support to argc and argc-completions.

complete argc 'p@*@`echo "$COMMAND_LINE'"''"'" | xargs argc --argc-compgen tcsh ""`@@';

argc --argc-compgen may generate words containing spaces, how to make it work?

Testing can be simplified as follows:

complete cmd 'p@*@`cat /tmp/file`@@'

The content of /tmp/file maybe:

Coldark-Cold
Monokai Extended
Solarized (dark)
Solarized (light)