Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > bash tab completion query

bash tab completion query
Thread Tools
Dedicated MacNNer
Join Date: Jan 2001
Location: Badfort
Status: Offline
Reply With Quote
Nov 16, 2003, 06:16 AM
 
I'm trying to make my bash environment in 10.3 as much like my tcsh one as possible, but i've become stuck with tilde completion in cd.

In tsch (with the Project Athena setup from /usr/share/tcsh/examples) i can type
  • cd ~
hit tab, and get a list of all users. If i just type
  • cd
and tab,i get a list of directories only.

In bash, i can setup complete to give either the users list behaviour, or the directories list, but not both (ie cd <tab> gives you directories, cd ~ <tab> gives users). Any smart ideas as to how this can be achieved?
You see, my friends, pirates are the key. - thalo
     
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Nov 16, 2003, 07:25 AM
 
In ~.bashrc I have:
set completion-ignore-case on

Enter ~ and press the Tab key twice. There it is.

Craig
     
Dedicated MacNNer
Join Date: Jan 2001
Location: Badfort
Status: Offline
Reply With Quote
Nov 16, 2003, 07:51 AM
 
Hmm, that just gives you case-insensitive complete, i already have it set in ~/.inputrc. Are you typing 'cd ~' or just '~'?

BTW if you don't like having to press tab twice, you can add

set show-all-if-ambiguous on


I have tilde completion elsewhere, my issue is that i can have cd either complete only directories, or ~users, but not both in context, like tcsh.
You see, my friends, pirates are the key. - thalo
     
Junior Member
Join Date: Feb 2003
Location: Oz
Status: Offline
Reply With Quote
Nov 16, 2003, 09:08 AM
 
I read somewhere, sometime ago, that the maintainer of the fink packaged bash distribution had set it up along similiar lines to the /usr/share/tcsh/examples setup

Whether this is still the case, and whether it actually achieves what you want - I dunno

- be stirred but never shaken -
     
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Nov 18, 2003, 05:41 PM
 
Originally posted by Jellytussle:
I'm trying to make my bash environment in 10.3 as much like my tcsh one as possible ..... Any smart ideas as to how this can be achieved?
Maybe this is too easy, but if you want tcsh then just use tcsh?

-
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:46 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2