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

Re: jumping ampersands?

On Jul 16,  7:21am, Eric De Mund wrote:
} Subject: Re: jumping ampersands?
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>:
} ] the auto-removal of the previously auto-added trailing space.
} Is this behavior option-settable?

Unfortunately, it's not settable in a way that you'd find useful.

You can turn off auto-removal, but that turns off auto-removal of all
suffixes (including most notably slashes after directory names), not
just spaces and not exclusively before semicolon/ampersand/bar, and
you *can't* turn off the auto-addition of the space.

The completion system supports using a shell function to decide what
to remove, but its name must be explicitly passed to the compadd
builtin; one function can't be applied generically to all completions.

} It represents an aesthetic that I just don't share; I strongly prefer
} a space character between commands and any following &'s, &&'s, and
} ||'s.

I share your sentiment.  The only thing I can immediately suggest is
that you train your fingers to type the space even if completion has
already added one.  Typing the space will cause the auto-added space
to be removed and replaced by the one you type, so the net effect is
invisible except that auto-removal will not thereafter occur.

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