/etc/profile.d/tcsh-complete, installed AND activated by default in gentoo, is, apparently, an example taken from the tcsh distro which was hardly supposed to be used as is. E.g., the annoying thing I noticed today is the ambiguous completion statement: complete -co* p/0/"(compress)"/ (with the bold comment "make compress completion not ambiguous"), which results in shadowing any other commands beginning with "co". Reproducible: Always Steps to Reproduce: 1. Type "co" at the prompt 2. Press [Tab] Actual Results: > compress Expected Results: > co col column composite convcal colcrt comm compress convert collateindex.pl compile_et conglomerate colorize complete conjure colrm complete-ant-cmd.pl continue In general, the situation with tcsh in Gentoo is pathetic (see e.g. bugs #17852, #35434). It may be a result of the credo "move all to the paradise of bash with the mighty hand" by some of developers - which could be discussed but is hardly worth to be implemented this way.
I have made this change. Are there any other change you think would be sensible to make? Please be specific.
Well, there are a few other issues with tcsh-complete. E.g. $hosts defaults to a list of US universities (and parsing of .ssh/known_hosts is wrong, as it presents a list of "host,ip" entries among others), `gs' has a pretty short list of possible devices (and part of them not compiled in usually) etc etc. I suggest to limit the contents of the file to a list of _really_ sensible and _safe_ completions, e.g. `cd' expands its args to directories only, and the rest be sourced optionally at user's will. BTW, a dangerous completion logic is enabled for `rm'. It's "smart" to not suggest removing .[c,h] and some other source files. Now a real-life experience: a user wanted to clean his work directory, typed "rm -f [TAB]", saw some .o junk and nothing important, added "*" and pressed [Enter]... Luckily, everything was backed up, but others might be less happy...
A few more changes for /etc/profile.d/tcsh-settings: set correct=cmd unset autocorrect set complete The current setting of 'correct=all' and 'complete=enhaced' leads to all kinds funny effects, which quickly become less funny when you actually try to work. E.g.: Try to complete 'mail': ---- snip ---- /home/baumeist> mai [TAB] Mail Mail/ MailArchive/ mail mail-files mailmail mailq mailshar mailx /home/baumeist> Mail --- snip ---- (Requires to have a 'Mail' directory in $HOME) Note that you end up with a capital 'M' which forces you to go back to the first letter, remove it and replace it with a small 'm'. Also nice is 'sudo': ----- snip ----- /home/baumeist> sudo emerge --search foo [RET] CORRECT>sudo .merge --search foo (y|n|e|a)? ----- snip ----- (Requires to have a '.merge' directory in $HOME) With the current settings tcsh autocompletion and correction is no longer an advantage but an annoyance. Default settings should follow the principle of least surprise for new users (unless the intention is indeed to drive everyone to bash). In addition - as mentioned above - /etc/profile.d/tcsh-completion should be seriously trimmed down. Otherwise it becomes a maintenance nightmare. Does anyone really intend to administer entries like 'complete gcc' where each new gcc option would require a change to its entry? Alas, I have no better version handy. BTW, The bug mentioned in the start of this thread still exists. co [TAB] expands to only 'compress' here. The solution to that bug is to remove the 'complete -co*' line from /etc/profile.d/tcsh-completion. Or, for anyone not able to edit that file, to put an 'uncomplete -co*' in one's .cshrc .
Anybody alive here? The bug is STLL there after more than a year since the submission!
Guys, not sure why this bug is mine but I don't use tcsh. People working on OOo should know this thing better than me.
Argh, damned bugzilla jumping on next found bug again. Re-assigning back, sorry for the noise.
hmmm, I found the defaults annoying as well, but I just switched the auto completion thing off, and defined my own in .tcshrc. Maybe we should just disable the options by default and give a pointer to the tcsh-complete file, as it was meant as example file, IMHO. Indeed there need to be patched some examples out there...
note to self: done
Fixed in 6.14-r1