GNU/Linux Inside

compgen -d: No such file or directory

For a while, I was having a problem on my Ubuntu server. After creating a user, I noticed that tab completion didn’t work properly. In fact, it went so far as to output an error:

<( compgen -d -- '/my/dir' ): No such file or directory

Where "/my/dir" would vary depending on what you're tab-completing. I suspected the problem might be with permissions, but that came up short.

I finally came across the solution here:

http://serverfault.com/questions/47554/ubuntu-tab-completon-and-mc-problems

Since I had trouble finding much information on Google, hopefully this post will help. It turned out to be a shell issue. When I created the user, I never specified the default shell to use (BASH), and I apparently never went back and changed it. Which explains why it worked on some of my users' accounts but not others.

No Trackbacks

You can leave a trackback using this URL: http://mikegerwitz.com/compgen-d-no-such-file-or-directory/trackback/

3 Comments

  1. Jordan

    You rock, thanks!

    Posted November 9, 2009 at 4:17 am | Permalink
  2. Martin

    Thanks a lot !!

    Posted April 6, 2010 at 3:56 pm | Permalink
  3. Fred

    Great! Thank you!

    (and for those who don’t know, change your default by either issuing “sudo usermod –shell /bin/bash ” or by editing the shell corresponding to your username in /etc/passwd)

    Posted July 14, 2010 at 6:57 am | Permalink

Post a Comment

Your email is never shared. Required fields are marked *

*
*