|
|
#1 |
|
Triple-A Player
Join Date: Jan 2002
Posts: 129
|
fixing tab auto-complete shell tricks under 10.2/Jaguar
A fun feature of 10.1.5 in the terminal was the ability to 'tab-complete' your commands or your paths etc.
now if there is a choice, hitting 'tab' results in a 'beep' and nothing else being provided. previously if you hit 'tab' while there were choices remaining, the shell would present the available choices. i.e. cd ~/Library/Pre [tab] would produce ~/Library/Preferences ~/Library/PreferencePanes and then complete the line to the point you left it before, i.e. cd ~/Library/Pre and leave it for you to decide. So how do I get it back?
__________________
Spaceman Spiff MacPro 3.33 13Gb 8TB 10.8.5 |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
|
Are you using tcsh?
In tcsh, filename completion should be always active. And as you said you hit the "TAB" key. When more than one completion is possible, tsch can automatically display matches. Maybe you need to set autolist in your ~/.cshrc file: set autolist (match listing for any completion failure) In csh, you hit the "ESC" key rather than "TAB". But you also need to activate filename completion by writing in your .cshrc file: 'set filec' Cheers... |
|
|
|
|
|
#3 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
AFAIK, tcsh startup scriptage is completely broken in 10.2
under 10.1.x $ cath /etc/csh.* ==> /etc/csh.cshrc <== source /usr/share/init/tcsh/rc ==> /etc/csh.login <== source /usr/share/init/tcsh/login ==> /etc/csh.logout <== source /usr/share/init/tcsh/logout under 10.2, these source'ings are gone, and so is /usr/share/init, so your startup scriptage doesn't get called. it's a mess. |
|
|
|
|
|
#4 |
|
MVP
Join Date: Jan 2002
Posts: 1,562
|
There are a lot of oddities in the way that Apple sets your defaults in terminal in Jag - including the autocomplete that you mention. I finally managed to get my term env back to close to normal by moving my 10.1.5 term files over.
There are two issues that are driving me nuts though: * I have autocomplete working, BUT it is now case sensitive so /li will not expand to /Library as it used to....not ithas to be /Li before it will expand. * MY biggest gripe though is actually part of the terminal software. Apple removed the ability to set the "option-click to insert" as a default and have it saved. You can change it on a window by window basis but I have yet to figure out how to get it to stick so all new windows open with that pref. I have searched the plist files, etc, and still no luck saving. |
|
|
|
|
|
#5 | |||||||||||||||||||
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
set complete='enhance' does that do it? |
|||||||||||||||||||
|
|
|
|
|
#6 |
|
Moderator
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
|
MervTormel,
As you said...what a mess! How is bash working with 10.2 ? Cheers... |
|
|
|
|
|
#7 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
i've completely bypassed the orwellian and rococo OSX startup init mishmash and have everything driven out of ~/.bash_profile and ~/.bash_login - so 10.2 posed no problems for bash so far.
|
|
|
|
|
|
#8 |
|
MVP
Join Date: Jan 2002
Posts: 1,562
|
If using tcsh - look here:
pico /usr/share/tcsh/examples/README This explains the standard technique used in the UNIX world for setting your tcsh env up in a modular way that works very well for me. |
|
|
|
|
|
#9 |
|
MVP
Join Date: Jan 2002
Posts: 1,562
|
thx Merv - the enhance solved the case sensitivity problem! I knw the solution was easy - just hadn't found it yet.
Now if I could just fix the option-click! |
|
|
|
|
|
#10 |
|
MVP
Join Date: Jan 2002
Posts: 1,562
|
If anyone is interested - I posted the files I use to get my tcsh back to what I am used to form OS X 10.1.5. The files are pretty generic as I removed all my own personalizations - so they should work if you want to use them or just look at them as a reference.
Download here A quick overview of the setup: Code:
/etc csh.logout csh.login csh.cshrc ~/Library/init/tcsh path environment.mine aliases.mine completions.mine rc.mine /usr/share/init/tcsh tcsh.defaults README rc environment completions aliases logout login The /etc files do nothing but source (aka read in) the files in your /usr/share/init/tcsh. The /usr/share/init/tcsh files setup system globals and then source (aka read in) the files in your ~/Library/init/tcsh. The files you will want to personalize are in ~/Library/init/tcsh. The other files are standard and don't really need modification. This method allows you to modularize your setup and avoid modifying the default system setup. I am definitely no expert on this - I created these from the old 10.1.5 setup and from a Linux machine I use as a LAN server. If anyone has any suggestions for improvements - please let me know. Last edited by bluehz; 08-22-2002 at 09:45 AM. |
|
|
|
|
|
#11 |
|
Triple-A Player
Join Date: Jan 2002
Posts: 129
|
thanks for the files, works great!
__________________
Spaceman Spiff MacPro 3.33 13Gb 8TB 10.8.5 |
|
|
|
|
|
#12 |
|
MVP
Join Date: Jan 2002
Posts: 1,562
|
Cool! Glad to hear confirmation it works well.
|
|
|
|
|
|
#13 | |||||||||||||||||||
|
Major Leaguer
Join Date: Jan 2002
Location: Northern Virginai
Posts: 294
|
I don't know why, but these files have been moved to /usr/share/tcsh/examples. You will need to move any *.mine files from init/tcsh to tcsh/examples, and then change /etc/csh.* to point to the new directory. |
|||||||||||||||||||
|
|
|
|
|
#14 | |||||||||||||||||||
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
very not recommended. the recommended approach is in bluehz's post above. put the files you need back where they belong. leave your ~/.../*.mine alone. leave /usr/share/tcsh/examples alone. |
|||||||||||||||||||
|
|
|
|
|
#15 | |||||||||||||||||||
|
Major Leaguer
Join Date: Jan 2002
Location: Northern Virginai
Posts: 294
|
bluehz's post seems to put all of your custom modifications in individual user's configurations, and doesn't allow you to make modifications for all users. What's the difference between adding "all-user" .mine files to tcsh/examples as opposed to recreating init/tcsh and copying the original files from examples to there and modifiying the directory paths in rc? |
|||||||||||||||||||
|
|
|
|
|
#16 |
|
MVP
Join Date: Jan 2002
Posts: 1,562
|
I doubt there is anything 'wrong' with making a universal setup for all users. I just chose to do it the documented, recommended, tried and true, unix way.
One thing I will tell you that has made my life easier. I am in and out of root (via CLI) all the time. I got tired of customizing my aliases, tcsh defaults, etc. for the standard user then not have them available when I switched into root. So what I did was manually create a Library directory within the root home dir. Then within that Library dir I created a symlink back to my original/standard users /Library/init dir. This way - you can maintain the modular setup above - but have the settings applied to two users. You could of course apply that to other users as desired. Not something I would probably recommend on an insecure/public machine - but it works for me. |
|
|
|
![]() |
|
|