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

How to delete spaces or set my separator between words when I using complete function on ZSH



Dear Sir,
   Good morning, sir.  I feel very sorry to disturb your work. And we met a problem on ZSH completion that we can't found an solution on official document of ZSH (A User's Guide to the Z-Shell (Chapter 6: Completion, old and new)).
    We are doing an open-sourced tool which can use on different shell, and we get stuck on ZSH completion now. On BASH, we can use a command ' compopt -o nospace ' to offset spaces when we are using completion. Same on ZSH, we want to delete spaces between words when we are using '_describe' function to complete.  Here is our a testcase(img_1 on attachment). Here is we want to achieve(img_2 on attachment). Could you tell us how can I achieve it on ZSH?
    By the way, ' _argument function ' also can't delete spaces between two words. But if an option has an equal sign, '_argument function' can delete space (img_3,img_4,img_5 on attachment), so I think that delete spaces when I using '_describe' complete function can be achieved on ZSH, same as BASH.
   Thank you for spending time on us, Have a nice day~


Your Sincerely
Yuhang Zheng
22-09-2022

Attachment: image_4.png
Description: PNG image

Attachment: img_2.png
Description: PNG image

Attachment: img_1.png
Description: PNG image

Attachment: image_3.png
Description: PNG image

Attachment: image_5.png
Description: PNG image



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