Thanks, I've implemented like you described, it works. On Wed, 13 Sept 2023 at 18:35, Bart Schaefer wrote: > On Wed, Sep 13, 2023 at 11:06 AM Sebastian Gniazdowski > wrote: > > > > How to make the bracket automatically closed at command run? > > The _dynamic_directory_name completion function already tries to do > this, but it's overridden by zsh_directory_name_generic. The latter > needs to define a compadd -R remove_func that swaps the colon for a > bracket, and use that instead of the -r option at around line 150. > -- Best regards, Sebastian Gniazdowski