1

I use menu-complete bash function to cycle through completion when I press Tab, and I'm happy with it. But it has too often happened to me the following.

Suppose I'm looking for the file longparthardtoremember.with.QQQQQQQ.extension in a directory which contains the files longparthardtoremember.with.AAAAAAA.nice.long.extension, longparthardtoremember.with.BBBBBBB.very.nice.long.extension, and so on. If I Tab-complete $ long the latter filename will be inserted. At that point, I'd like to move to the middle of the filename, delete the AAAAAAA part, type B, and then Tab-complete again. If I do so, all the part after BBBBBBB is inserted as well, thus leading to a duplication of it, which I obviously don't want.

With vi editing mode, a quite quick in dealing with this (I quickly move to the repeated part and delete it), but it is still annoying.

By pure chance I've find the skip-completed-text bash option in bash's man page. Isn't this what I need? I've set it on, but I can't see any difference in the behavior of in-middle-of-work Tab-completion. Have I misunderstood the man page?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.