Re: Enhancing the user experience with tcsh

From: Kevin Oberman <kob6558_at_gmail.com>
Date: Fri, 10 Feb 2012 09:21:33 -0800
On Fri, Feb 10, 2012 at 9:07 AM, Chuck Burns <break19_at_gmail.com> wrote:
> On 2/10/2012 10:41 AM, Gavin Atkinson wrote:
>>
>> On Fri, 2012-02-10 at 11:25 -0500, Eitan Adler wrote:
>>>
>>> Picking a random email to reply to.
>>>
>>> My goal with this email is to reduce the amount of "controversial"
>>> changes.
>>
>> I applaud this.  I've often considered doing the same but avoided it
>> because it was easier than fighting the bikeshed :)
>>
>>> commit 3ea4ea3a59d14cb060244618dd89d7dd0170bee1
>>> diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc
>>> --- a/etc/root/dot.cshrc
>>> +++ b/etc/root/dot.cshrc
>>> _at__at_ -7,9 +7,10 _at__at_
>>>
>>>  alias h                history 25
>>>  alias j                jobs -l
>>> -alias la       ls -a
>>> +alias la       ls -aF
>>>  alias lf       ls -FA
>>> -alias ll       ls -lA
>>> +alias ll       ls -lAF
>>> +alias ls       ls -F
>>>
>>> Two people didn't like these changes but didn't explain why. This is
>>> incredibly helpful, especially for a new user.  If you dislike the
>>> alias change please explain what bothers you about it?
>>
>> I don't use the first two aliases, so I don't care about them at all.  I
>> do however disagree strongly with changing the default options on such a
>> widely used command.
>>
>> This change is disruptive, and it can affect use of ls(1) in scripts.
>> For example, it even sticks the extra characters in the output of
>> "ls -1" (the number 1), which is specifically designed to be used when
>> piping the output elsewhere.  Please do not break this.  It is also
>> distracting - If I want to see what type of file a particular entry is,
>> why not just run "ls -l"?
>>
>> It's like the tendency some Linux distributions have of
>> "alias mv mv -i", although that can at least be overridden on the
>> command line with "-f".  The "ls -F" change cannot be overridden without
>> unaliasing.
>>
>>>  if ($?prompt) then
>>>        # An interactive shell -- set some stuff up
>>> -       set prompt = "`/bin/hostname -s`# "
>>> +       set prompt = "[%n_at_%m]%c04%# "
>>> +       set promptchars = "%#"
>>>
>>> Many people had alternative suggestions for the prompt. Can you please
>>> clarify why you believe your prompt should be the _default_ one?
>>
>> I can't comment as I didn't say my suggestion should be default - but
>> for me the above isn't a bad choice.  I would however prefer:
>> set prompt = "%n_at_%m:%c04 %# "
>> and not
>> set prompt = "[%n_at_%m]%c04%# "
>>
>> as that then gives you user_at_host:path in exactly the same format as you
>> need to use with scp, etc.
>>
>>
>>>> I use the $HOME/bin on my machines but I am not so sure to make this a
>>>> general thing.
>>>
>>> Many people expect it, and given that it is the last item in the path
>>> it won't affect all that much.
>>
>> It's been in there forever.  I think this should stay, it would just be
>> too disruptive otherwise.
>>
>>
> My $0.02
>
> Instead of using -F to denote filetypes, why not use colors? -G -- it
> shouldnt affect scripts at all, yet still provide the same sort of feedback.
> (Tho, I personally use csh's built-in "ls-F" instead of "ls", and actually
> tend to alias it to ls as well.)
>
> Just a thought.
>
> I do, however, like most of the other changes. Here's my stamp. "Approved"
> :)

I want mine green with yellow trim.

That said, if you really want to look at massive .tcshrc setup, look
at shells/tcshrc. It's woefully out of date and the latest version
upstream has a lot more cool stuff, but it takes a lot of hacking
since it's written for Linux. (I still need to fix auto-complete for
route(8).) It's really got all of the bells and whistles , but I don't
think it's for everyone and I certainly tend to heavily modify my own.
-- 
R. Kevin Oberman, Network Engineer
E-mail: kob6558_at_gmail.com
Received on Fri Feb 10 2012 - 16:21:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:24 UTC