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

Re: 'remove slash' bug



On Jun 15,  6:35pm, Peter Stephenson wrote:
} Subject: Re: 'remove slash' bug
}
} "Bart Schaefer" wrote:
} > zsh% touch /tmp/foo
} > zsh% ls /tm/foo
} > 
} > Move the cursor to the 'm' and press TAB.  In both 3.0.5 and 3.1.4, this
} > produces "ls /tmp/foo " (note the trailing space).  In 3.1.4, typing any
} > further key other than self-insert deletes the trailing space.  3.0.5
} > leaves the space alone.
} 
} There is a quite deliberate test for this in the code at the moment,
} so somebody (Zefram?) thought it was a good idea.  What should happen?
} 
} 1 Present (3.1.4) behaviour
} 2 Space added, but left alone (not autoremovable)
}   (i) if the cursor had to be moved to the end of the word
}   (ii) even if the cursor was at the end of the word already
} 3 No space added if the cursor was previously not at the end of
} the line, i.e. you would get /tmp/foo with the cursor immediately
} after the foo.  In that case, another tab would add a space, although
} with the /usr/ example you would get completion inside the directory
} at that point (which you could with an autoremovable space, but less
} intuitively).  In this case any space added could still be
}   (i) autoremovable
}   (ii) not

I vote for (3i), if it's not hard to accomplish, simply because of being
able to get completion inside the directory.

As a general rule, I'd prefer that zsh didn't auto-remove anything it
didn't auto-insert in the first place, except possibly upon accept-line,
but that's probably hard to keep track of.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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