On Mon, 23 Dec 2002 01:28:21 +0000
"Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx> wrote:
> You can't turn it off. You can only forcibly defeat it. You can
> either define your own completions with auto-suffix-removal disabled,
> for every situation in which you don't want this to happen; or you can
> re-bind the specific keys for which, when typed after a completion, it
> should not happen. The latter is probably easier:
I suspected as much, at least for the auto-suffx-removal stuff; after I
read largish portions of zshcomp*(1), I got worried ;)
> function self-insert-no-autoremove {
> LBUFFER="$LBUFFER$KEYS"
> }
> zle -N self-insert-no-autoremove
> bindkey '|' self-insert-no-autoremove
>
> The reasons why you can't turn it off are varied and in some instances
> nearly lost in the mists of time, but it boils down to something like:
> (1) it was automatically added, so it's not costing you keystrokes if
> it automatically goes away again; (2) the absence of the space doesn't
> matter to the syntax; (3) there are more cases where leaving the space
> is wrong, than cases where removing it is wrong; so (4) if you really
> want a space there, you can just type one yourself.
Thanks a bunch for the help :) I appreciate it a lot.
P.S.: For the other poster to this tread asking why I needed it off, the
answer is: "I don't". I don't need it off, I want it off. I do a lot of
shell script writing for my work, and I do the prototypes live in an
interactive shell. Once I've poked it enough, I copy and paste it into
the shell script. Spaces around punctuation make things much more
readable. Have you tried to maintain a 50k shell script that wasn't
formatted nicely? :) I've just been having to go through re-editing the
paste, and it proves irritating. That's all. No "need" involved.
Attachment:
pgpN5IAwonUJs.pgp
Description: PGP signature