I just installed the mksh and don't know how to solve one litte problem I have. When trying to change directory to the parent directory mksh does not complete when pressing "tab". Let me visualize:

$ cd .."tab"

will not end in

$ cd ../

What needs to be added to the mkshrc in order to get this feature?

Thanks in advance!

  • looks like a bug in mksh. maybe try ksh93 instead. or bash.
    – cas
    Nov 17, 2015 at 22:39
  • 2
    Presumably that's not done because it's pointless: ../ and ..<TAB> require the same number of keypresses. Even zsh doesn't complete .. to ../ by default (though being zsh it has an option to enable it). Nov 17, 2015 at 23:39
  • @Gilles Well, pointless is relative. I have a german keyboard and pressing "/" requires shift+7 whereas "tab" ist just "tab".
    – famfop
    Nov 18, 2015 at 13:51

1 Answer 1


Tab completion uses globbing internally. In mksh (and possibly other Korn Shell variants), . and .. are never matched in globbing (to prevent accidents with rm, mostly).

Using a German keyboard is unfortunate, otherwise I’d say I’m with @Gilles on this… (I switched from de to us layout and don’t regret it, personally). But this does mean that there is nothing you can do to make mksh tabcomplete ...

If you need it often, you could use this:

function .. {
    cd ../"$1"

Unfortunately, this would still not allow tab-completing through it. So, Shift-7 or switching kezboard (spelling intended) layout is the way to go.

Disclaimer: I’m the developer.

  • Well, although I'm not happy with it I guess I'll have to accept it. Still, thanks for the reply. oh, and +1 for kezboard ;)
    – famfop
    Nov 19, 2015 at 15:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .