Re: Enhancing the user experience with tcsh
Eitan Adler wrote: On Tue, Feb 14, 2012 at 8:19 AM, Astrodog wrote: Personally, I pay very little attention to the prompt. That being said... Plenty of people prefer widely different configurations for the prompt. I think everyone agrees that the default prompt isn't particularly informative, however, achieving consensus here is going to be almost impossible. I suggest that it be handled as a seperate discussion, perhaps? That would result in even more of a bikeshed than this thread. I'm pretty sure I'm going to go with one of the prompts posted to this thread after a bit of experimentation. Remember that the prompts are for inexperienced users and those of you with awesome prompts are not the target audience for the change. Not just prompts, but everything in default .cshrc / .tcshrc should be targeted to inexperienced new users and we should look at it from this point of view. Not from "our personal preferences". The current and future changes in .cshrc is not targeted to us - readers of freebsd-current@, but to new users comming from the world of windows and penguins. I still remember those days when I came from Win95 to FreeBSD 4.x and didn't know anything about shell's possibilities. Somebody recommends me bash and I used it as my default shell for a couple of years - until I realized, that same or better prompt, completion and history search can be achieved with already installed csh / tcsh. Just by few modifications in .cshrc. I don't think readers of this mailing list are using default unmodified .cshrc. So the question is not "what is good to me" (or to you), but "what is good for new users?". What can we serve them to make their life easier and show them the power and possibilities of tcsh. We all can still use our good old .cshrc modifications, our own prompt, colors, etc. as we already do. That's why I am proposing as much "Good features (TM)" enabled by default as possible. Because we others can easily disabled them if we don't like them. But new users can't enabled them, because they don't know about them. Miroslav Lachman ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
... snip ... > if ($?prompt) then > # An interactive shell -- set some stuff up > - set prompt = "`/bin/hostname -s`# " > + set prompt = "[%n@%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? > While many admins are able to deal with short non-descriptive prompts > it helps new users to have more detail on the prompt line. I'd like to > commit some change to the default: currently it is very undescriptive. > I am leaving open which prompt I am going with at the end though. Personally, I pay very little attention to the prompt. That being said... Plenty of people prefer widely different configurations for the prompt. I think everyone agrees that the default prompt isn't particularly informative, however, achieving consensus here is going to be almost impossible. I suggest that it be handled as a seperate discussion, perhaps? > > set filec > - set history = 100 > - set savehist = 100 > + set history = 1 > + set savehist = 1 > > No one complained about this one - it is almost certainly going to > stay it the final version. > > + set autolist > > set autolist=ambiguous makes sense here - I will likely go with that. > > + # Use history to aid expansion > + set autoexpand > > No one complained about this - it is almost certainly going to stay > it the final version. > > Now to address some comments made in the thread. I'm sorry for not > preserving attribution here. > >> How about adding stuff like this to /usr/share/examples/tcsh/complete.tcsh ? >> Along with a comment in .cshrc pointing to that file (or even a commented >> line to source it), it would be an improvement. > > +1 I'll add a comment addressing this file. > >> 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. I am against this change, barring a more compelling reason to include it. Default behavior limits $PATH to areas that are only writable as root, and there is no garuntee that $HOME can only be written by the user. As a result, the change may create unanticipated and unnoticed security consequences some installations. I believe this outweighs the functionality provided by the proposed change, given how trivial this is to configure after the fact. ... snip ... These two issues aside, I do like the idea here. Here's hoping it doesn't collapse under thousands of coats of paint. --- Harrison ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 10/02/2012 17:25, Eitan Adler wrote: > setenv BLOCKSIZE K Why note BLOCKSIZE M? It's pretty much ridiculous to count kilobytes nowadays. > Many people had alternative suggestions for the prompt. Can you please > clarify why you believe your prompt should be the _default_ one? My prompt suggestion: set prompt="%U%m%u:%B%~%b%# " It makes the prompt lines clearly and loudly visible in a screen full of busy commands. signature.asc Description: OpenPGP digital signature
Re: Enhancing the user experience with tcsh
On Tue, Feb 14, 2012 at 7:26 AM, Eitan Adler wrote: > On Tue, Feb 14, 2012 at 8:19 AM, Astrodog wrote: >> Personally, I pay very little attention to the prompt. That being said... >> Plenty of people prefer widely different configurations for the prompt. >> I think everyone agrees that the default prompt isn't particularly >> informative, however, achieving consensus here is going to be almost >> impossible. I suggest that it be handled as a seperate discussion, >> perhaps? > > That would result in even more of a bikeshed than this thread. I'm > pretty sure I'm going to go with one of the prompts posted to this > thread after a bit of experimentation. > Remember that the prompts are for inexperienced users and those of you > with awesome prompts are not the target audience for the change. I'm not actually against any of the prompts that have been suggested. They're all fine with me. I use too many shared machines, or use machines temporarly to expect anything at all from the prompt anyway. > >> I am against this change, barring a more compelling reason to include >> it. Default behavior limits $PATH to areas that are only writable as >> root, and there is no garuntee that $HOME can only be written by the >> user. As a result, the change may create unanticipated and unnoticed >> security consequences some installations. I believe this outweighs the >> functionality provided by the proposed change, given how trivial this >> is to configure after the fact. > > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > /usr/local/bin $HOME/bin) > > is the default > Whoops. I should have known a couple of years ago that adding a handful of random patches to my build machine wasn't a great idea. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Tue, Feb 14, 2012 at 8:19 AM, Astrodog wrote: > Personally, I pay very little attention to the prompt. That being said... > Plenty of people prefer widely different configurations for the prompt. > I think everyone agrees that the default prompt isn't particularly > informative, however, achieving consensus here is going to be almost > impossible. I suggest that it be handled as a seperate discussion, > perhaps? That would result in even more of a bikeshed than this thread. I'm pretty sure I'm going to go with one of the prompts posted to this thread after a bit of experimentation. Remember that the prompts are for inexperienced users and those of you with awesome prompts are not the target audience for the change. > I am against this change, barring a more compelling reason to include > it. Default behavior limits $PATH to areas that are only writable as > root, and there is no garuntee that $HOME can only be written by the > user. As a result, the change may create unanticipated and unnoticed > security consequences some installations. I believe this outweighs the > functionality provided by the proposed change, given how trivial this > is to configure after the fact. set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin) is the default -- Eitan Adler ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
My diff: +set autolist -setenv PAGER more +setenv PAGER less if ($?prompt) then # An interactive shell -- set some stuff up + set promptchars = '$#' + set prompt = "%{^[[50;73;1m%}\[`whoami`@%m %~\]%#%{^[[m%} " I think 'set autolist' must have everyone. PAGER is not necessary. And this is best prompt I think =) -- View this message in context: http://freebsd.1045724.n5.nabble.com/Enhancing-the-user-experience-with-tcsh-tp5471144p5481784.html Sent from the freebsd-current mailing list archive at Nabble.com. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Chris Rees wrote: set prompt = "[%n@%m]%c04%# " it's not needed need some as alias ll ls -lAhG alias ls ls -G Lscolors are an abomination. -F or nothing at all is better; remember some people will use white xterms etc. Yeah, a +1 for me. Plain xterm with colorized output makes you feel like using fork to pry your eyes out... That's surely not a good default. -- Sphinx of black quartz judge my vow. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Alex Keda wrote: On 10.02.2012 21:07, Chuck Burns wrote: set prompt = "[%n@%m]%c04%# " it's not needed need some as alias ll ls -lAhG alias ls ls -G set autolist = TAB bindkey "\e[3~" delete-char . and other _really_ necessary settings This can be as simple as defining CLICOLOR. However colors of ls -G wouldn't match with default color set in LSCOLORS so correct LS_COLORS string would be needed too. -- Sphinx of black quartz judge my vow. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Sun, Feb 12, 2012 at 2:16 PM, Chris Rees wrote: > > On 12 Feb 2012 17:11, "Chuck Swiger" wrote: >> >> On Feb 11, 2012, at 11:05 PM, Gonzalo Nemmi wrote: >> > Joel, with all due respect, do you really think that 99.9% of all >> > users will not find the _non_intrusive_ additions below useful? >> > >> > bindkey "\e[1~" beginning-of-line #make Home key work; >> > bindkey "\e[2~" overwrite-mode #make Ins key work; >> > bindkey "\e[3~" delete-char #make Delete key work; >> > bindkey "\e[4~" end-of-line #make End key work; >> >> Yes, I do not find the additions mentioned right here useful. >> >> Much of the time, I'm using a laptop which does not have dedicated >> Home/INS/Delete/End keys. And even when I am using a full 10x-key keyboard, >> I would not use them since I prefer using editmode=emacs and Cntl-A / E. > > So do I, but would these hurt you? > > I think it's insane that by default the standard keys don't work. > > Chris That´s exactly my point! I use vim mode, yet, those keys do exist and they don´t work by default! Even if you don´t use them those keys should be fully functional by default. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 12 Feb 2012 18:22, "Chuck Swiger" wrote: > > On Feb 12, 2012, at 9:16 AM, Chris Rees wrote: > > So do I, but would these hurt you? > > At the present time, no. (At one point, I was using a keyboard > where the arrow keys generated "ESC-[ 1 ~" through "4", > IIRC, but I haven't been on console on it in some time.) > > > I think it's insane that by default the standard keys don't work. > > What "standard keys" would those be? > > Folks, assuming that everyone uses IBM-AT derived American QUERTY > layout keyboard is faulty. Our German friends are more likely to use > a QUERTZ layout, French/Benelux tend to use AZERTY, and non ISO-Latin-1 > languages like Russian and the asian languages have still other layouts. > > On the non-laptop keyboard I use most, which does have a QUERTY layout, > but it does not have an "Insert" key; that key is the function key: > > http://en.wikipedia.org/wiki/File:Apple_iMac_Keyboard_A1243.png [1] > > On other non-American keyboards, the "Insert" key is labelled "Help", > and generated 0xF5 ("F1" + Meta/set-high-bit?). > > Regards, > -- > -Chuck > > [1]: Which is decent, but not perfect. I'd swap ESC and "`~", and > caps-lock with control, and that would IMO be the perfect layout. > > For obvious reasons, I don't recall ever using or needing to use the > function key. Even when on a Windows box, I wouldn't typically use > the middle-upper 6-key Ins/DEL/etc block; I touch-type and my hands > don't like to leave home row. (On the other hand, I do change volume > and screen brightness daily, and even eject audio CDs more than I need Fn. > I'm just as happy to not need to do these things via two key-presses...) > > PS: Folks, all of the above discussion, which includes my preferences, is > aside from my main point, which is that proposed changes should first > land as examples. Far too much of what people consider obvious improvements > not only do not apply everywhere, they sometimes *don't* *work* and break > things. Right... not once however have you referenced the Home/End/Delete keys, which is what I was talking about (I'll give you Insert) :) The scan codes for those three keys are the same on (almost) all,keyboards. Jilles is right about fixing the tcsh source however. Chris ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Feb 12, 2012, at 9:16 AM, Chris Rees wrote: > So do I, but would these hurt you? At the present time, no. (At one point, I was using a keyboard where the arrow keys generated "ESC-[ 1 ~" through "4", IIRC, but I haven't been on console on it in some time.) > I think it's insane that by default the standard keys don't work. What "standard keys" would those be? Folks, assuming that everyone uses IBM-AT derived American QUERTY layout keyboard is faulty. Our German friends are more likely to use a QUERTZ layout, French/Benelux tend to use AZERTY, and non ISO-Latin-1 languages like Russian and the asian languages have still other layouts. On the non-laptop keyboard I use most, which does have a QUERTY layout, but it does not have an "Insert" key; that key is the function key: http://en.wikipedia.org/wiki/File:Apple_iMac_Keyboard_A1243.png [1] On other non-American keyboards, the "Insert" key is labelled "Help", and generated 0xF5 ("F1" + Meta/set-high-bit?). Regards, -- -Chuck [1]: Which is decent, but not perfect. I'd swap ESC and "`~", and caps-lock with control, and that would IMO be the perfect layout. For obvious reasons, I don't recall ever using or needing to use the function key. Even when on a Windows box, I wouldn't typically use the middle-upper 6-key Ins/DEL/etc block; I touch-type and my hands don't like to leave home row. (On the other hand, I do change volume and screen brightness daily, and even eject audio CDs more than I need Fn. I'm just as happy to not need to do these things via two key-presses...) PS: Folks, all of the above discussion, which includes my preferences, is aside from my main point, which is that proposed changes should first land as examples. Far too much of what people consider obvious improvements not only do not apply everywhere, they sometimes *don't* *work* and break things. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Sun, Feb 12, 2012 at 04:05:14AM -0300, Gonzalo Nemmi wrote: > Joel, with all due respect, do you really think that 99.9% of all > users will not find the _non_intrusive_ additions below useful? > bindkey "\e[1~" beginning-of-line #make Home key work; > bindkey "\e[2~" overwrite-mode #make Ins key work; > bindkey "\e[3~" delete-char #make Delete key work; > bindkey "\e[4~" end-of-line #make End key work; > ... I mean, after all, setting those keys do not change the behaviour > nor the output of any given command, they are present in 99.9% of the > keyboards we all get to see everyday and they do not work under the > current .cshrc config. > Im not talking about an "improvement", "making things easier for new > users" or "experience improvement" of any kind ... Im talking about > including them so all users get to have a fully functional keyboard by > default. I think this kind of basic stuff should work without any configuration; it should be fixed in the tcsh code if it does not work already. It looks like Home and End already work in the common configurations (xterm and cons25), so bindkey is unnecessary for them. Delete should be fixed in tcsh like I fixed it in libedit in r212235, which will make it work in xterm but not cons25. If the 7.x/8.x syscons is important enough, further tweaking may be appropriate. The Ins key is more questionable because I think it is not used deliberately by many people but is annoying if you accidentally press it and do not realize. -- Jilles Tjoelker ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 12 Feb 2012 17:11, "Chuck Swiger" wrote: > > On Feb 11, 2012, at 11:05 PM, Gonzalo Nemmi wrote: > > Joel, with all due respect, do you really think that 99.9% of all > > users will not find the _non_intrusive_ additions below useful? > > > > bindkey "\e[1~" beginning-of-line #make Home key work; > > bindkey "\e[2~" overwrite-mode #make Ins key work; > > bindkey "\e[3~" delete-char #make Delete key work; > > bindkey "\e[4~" end-of-line #make End key work; > > Yes, I do not find the additions mentioned right here useful. > > Much of the time, I'm using a laptop which does not have dedicated Home/INS/Delete/End keys. And even when I am using a full 10x-key keyboard, I would not use them since I prefer using editmode=emacs and Cntl-A / E. So do I, but would these hurt you? I think it's insane that by default the standard keys don't work. Chris ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Feb 11, 2012, at 11:05 PM, Gonzalo Nemmi wrote: > Joel, with all due respect, do you really think that 99.9% of all > users will not find the _non_intrusive_ additions below useful? > > bindkey "\e[1~" beginning-of-line #make Home key work; > bindkey "\e[2~" overwrite-mode #make Ins key work; > bindkey "\e[3~" delete-char #make Delete key work; > bindkey "\e[4~" end-of-line #make End key work; Yes, I do not find the additions mentioned right here useful. Much of the time, I'm using a laptop which does not have dedicated Home/INS/Delete/End keys. And even when I am using a full 10x-key keyboard, I would not use them since I prefer using editmode=emacs and Cntl-A / E. Regards, -- -Chuck ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
> How about adding stuff like this to /usr/share/examples/tcsh/complete.tcsh ? > > -- > Joel Yes to that. This is exactly where these suggestions should go. Feel free to create multiple examples files there but be very carefully with changes to system wide defaults. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Sat, Feb 11, 2012 at 5:07 AM, Joel Dahl wrote: > On 10-02-2012 9:03, Eitan Adler wrote: >> Picking a random person to reply to. >> >> There are a lot of good suggestions in this thread, but can we please >> remember a few things: >> >> - Users can always add their own ~/.cshrc >> - Many users will get annoyed by what is someone else's amazing setup > > With the above in mind, I suggest we change as little as possible from what > we have today (for now) and that we do improvements in small steps. > > I believe 99.99% of all users would find the change below to be a definite > improvement over the current default values in .cshrc: > > Index: dot.cshrc > === > --- dot.cshrc (revision 231507) > +++ dot.cshrc (working copy) > @@ -24,8 +24,10 @@ > # An interactive shell -- set some stuff up > set prompt = "`/bin/hostname -s`# " > set filec > - set history = 100 > - set savehist = 100 > + set history = 1000 > + set savehist = (1000 merge) > + set autolist > + set autoexpand > set mail = (/var/mail/$USER) > if ( $?tcsh ) then > bindkey "^W" backward-delete-word > > Also, a comment pointing to /usr/share/examples/tcsh/complete.tcsh would > be a nice addition to the default .cshrc. > > -- > Joel Joel, with all due respect, do you really think that 99.9% of all users will not find the _non_intrusive_ additions below useful? bindkey "\e[1~" beginning-of-line #make Home key work; bindkey "\e[2~" overwrite-mode #make Ins key work; bindkey "\e[3~" delete-char #make Delete key work; bindkey "\e[4~" end-of-line #make End key work; ... I mean, after all, setting those keys do not change the behaviour nor the output of any given command, they are present in 99.9% of the keyboards we all get to see everyday and they do not work under the current .cshrc config. Im not talking about an "improvement", "making things easier for new users" or "experience improvement" of any kind ... Im talking about including them so all users get to have a fully functional keyboard by default. Gonzalo ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Sun, Feb 12, 2012 at 5:12 AM, Joel Dahl wrote: > On 12-02-2012 4:05, Gonzalo Nemmi wrote: >> On Sat, Feb 11, 2012 at 5:07 AM, Joel Dahl wrote: >> > On 10-02-2012 9:03, Eitan Adler wrote: >> >> Picking a random person to reply to. >> >> >> >> There are a lot of good suggestions in this thread, but can we please >> >> remember a few things: >> >> >> >> - Users can always add their own ~/.cshrc >> >> - Many users will get annoyed by what is someone else's amazing setup >> > >> > With the above in mind, I suggest we change as little as possible from what >> > we have today (for now) and that we do improvements in small steps. >> > >> > I believe 99.99% of all users would find the change below to be a definite >> > improvement over the current default values in .cshrc: >> > >> > Index: dot.cshrc >> > === >> > --- dot.cshrc (revision 231507) >> > +++ dot.cshrc (working copy) >> > @@ -24,8 +24,10 @@ >> > # An interactive shell -- set some stuff up >> > set prompt = "`/bin/hostname -s`# " >> > set filec >> > - set history = 100 >> > - set savehist = 100 >> > + set history = 1000 >> > + set savehist = (1000 merge) >> > + set autolist >> > + set autoexpand >> > set mail = (/var/mail/$USER) >> > if ( $?tcsh ) then >> > bindkey "^W" backward-delete-word >> > >> > Also, a comment pointing to /usr/share/examples/tcsh/complete.tcsh would >> > be a nice addition to the default .cshrc. >> > >> > -- >> > Joel >> >> Joel, with all due respect, do you really think that 99.9% of all >> users will not find the _non_intrusive_ additions below useful? > > You're missing the point. We need to start with something small that we > all can agree on. We'll never reach consensus if we're trying to change > too much at once (just check the amount of messages this topic has created > already). > > -- > Joel Sure thing Joel, I understand that but I still keep in mind what was it that prompted Wojciech to open (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689): FreeBSD should have .cshrc updated for modern hardware and useful aliases installed by default I can see how the bulk of the messages posted in this thread are not aiming towards the first half of that goal, and I sure hope you can see how I didn´t post any aliases, bindkeys, unameit of my liking, except for those unintrusive 4 that I still fail to see how adding them is not a step forward to a ".cshrc updated for modern hardware" given that those 4 keys are on every modern keyboard yet they do no work by default ... Best Regads Gonzalo ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 12-02-2012 4:05, Gonzalo Nemmi wrote: > On Sat, Feb 11, 2012 at 5:07 AM, Joel Dahl wrote: > > On 10-02-2012 9:03, Eitan Adler wrote: > >> Picking a random person to reply to. > >> > >> There are a lot of good suggestions in this thread, but can we please > >> remember a few things: > >> > >> - Users can always add their own ~/.cshrc > >> - Many users will get annoyed by what is someone else's amazing setup > > > > With the above in mind, I suggest we change as little as possible from what > > we have today (for now) and that we do improvements in small steps. > > > > I believe 99.99% of all users would find the change below to be a definite > > improvement over the current default values in .cshrc: > > > > Index: dot.cshrc > > === > > --- dot.cshrc (revision 231507) > > +++ dot.cshrc (working copy) > > @@ -24,8 +24,10 @@ > > # An interactive shell -- set some stuff up > > set prompt = "`/bin/hostname -s`# " > > set filec > > - set history = 100 > > - set savehist = 100 > > + set history = 1000 > > + set savehist = (1000 merge) > > + set autolist > > + set autoexpand > > set mail = (/var/mail/$USER) > > if ( $?tcsh ) then > > bindkey "^W" backward-delete-word > > > > Also, a comment pointing to /usr/share/examples/tcsh/complete.tcsh would > > be a nice addition to the default .cshrc. > > > > -- > > Joel > > Joel, with all due respect, do you really think that 99.9% of all > users will not find the _non_intrusive_ additions below useful? You're missing the point. We need to start with something small that we all can agree on. We'll never reach consensus if we're trying to change too much at once (just check the amount of messages this topic has created already). -- Joel ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 2/11/12 12:07 AM, Joel Dahl wrote: On 10-02-2012 9:03, Eitan Adler wrote: Picking a random person to reply to. There are a lot of good suggestions in this thread, but can we please remember a few things: - Users can always add their own ~/.cshrc - Many users will get annoyed by what is someone else's amazing setup With the above in mind, I suggest we change as little as possible from what we have today (for now) and that we do improvements in small steps. I believe 99.99% of all users would find the change below to be a definite improvement over the current default values in .cshrc: Put lots of stuff in there and disable them by default Index: dot.cshrc === --- dot.cshrc (revision 231507) +++ dot.cshrc (working copy) @@ -24,8 +24,10 @@ # An interactive shell -- set some stuff up set prompt = "`/bin/hostname -s`# " set filec - set history = 100 - set savehist = 100 + set history = 1000 + set savehist = (1000 merge) + set autolist + set autoexpand set mail = (/var/mail/$USER) if ( $?tcsh ) then bindkey "^W" backward-delete-word Also, a comment pointing to /usr/share/examples/tcsh/complete.tcsh would be a nice addition to the default .cshrc. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 10-02-2012 9:03, Eitan Adler wrote: > Picking a random person to reply to. > > There are a lot of good suggestions in this thread, but can we please > remember a few things: > > - Users can always add their own ~/.cshrc > - Many users will get annoyed by what is someone else's amazing setup With the above in mind, I suggest we change as little as possible from what we have today (for now) and that we do improvements in small steps. I believe 99.99% of all users would find the change below to be a definite improvement over the current default values in .cshrc: Index: dot.cshrc === --- dot.cshrc (revision 231507) +++ dot.cshrc (working copy) @@ -24,8 +24,10 @@ # An interactive shell -- set some stuff up set prompt = "`/bin/hostname -s`# " set filec - set history = 100 - set savehist = 100 + set history = 1000 + set savehist = (1000 merge) + set autolist + set autoexpand set mail = (/var/mail/$USER) if ( $?tcsh ) then bindkey "^W" backward-delete-word Also, a comment pointing to /usr/share/examples/tcsh/complete.tcsh would be a nice addition to the default .cshrc. -- Joel ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Friday, 10th February 2012, Eitan Adler wrote: >-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? You should never, ever alias over a standard command in a default profile. It will only train new users incorrectly. Having to use \ls to get the real ls is not an answer. If you think -F should be the default behaviour of ls, commit it directly to the ls source. Then run away fast! :-) As for the other ls aliases, I don't see the point given "lf" already exists. My only advice for your overall .cshrc changes is to be minimal and aim low. You may have a chance at consensus then. Good luck! By the way, one of the nice things about FreeBSD vs Linux is that less shell configuration is set up by default, so less work is needed to undo it all before you can get your own settings done. Every "helpful" thing that is set in /.cshrc or any other global config file is something someone somewhere will have to discover and turn off. Try not to make it too hard for them. Stephen. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
on 11/02/2012 00:29 Chuck Swiger said the following: > On Feb 10, 2012, at 2:12 PM, Andriy Gapon wrote: >> I really hate the default behavior of less where you can't quit via ^C or via >> paging through the end of file. > > It's readily tunable, by setenv'ing LESS variable to contain some of: > >-e or --quit-at-eof > Causes less to automatically exit the second time it reaches > end-of-file. By default, > the only way to exit less is via the "q" command. > >-E or --QUIT-AT-EOF > Causes less to automatically exit the first time it reaches > end-of-file. > >-K or --quit-on-intr > Causes less to exit immediately when an interrupt character > (usually ^C) is typed. > Normally, an interrupt character causes less to stop whatever > it is doing and return to > its command prompt. Note that use of this option makes it > impossible to return to the > command prompt from the "F" command. Exactly. So my larger point is that less and more are actually the same binary and whatever behavior a user prefers can be achieved via MORE or LESS. Neither of the default behaviors was satisfactory enough personally for me. -- Andriy Gapon ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 2/10/12, Eitan Adler wrote: > In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) > there has been some discussion about changing the default cshrc file. > > I'd like to commit something like the following based on Chris's patch > at the end of the thread. This post is an attempt to open the change > to wider discussion. > > commit dbe6cb730686dd53af7d06cc9b69b60e6e55549c > diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc > --- a/etc/root/dot.cshrc > +++ b/etc/root/dot.cshrc > @@ -7,9 +7,10 @@ > > 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 > > # A righteous umask > umask 22 > @@ -17,19 +18,24 @@ umask 22 > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > /usr/local/bin $HOME/bin) > > setenv EDITOR vi > -setenv PAGER more > +setenv PAGER less > setenv BLOCKSIZE K > > if ($?prompt) then > # An interactive shell -- set some stuff up > set prompt = "`/bin/hostname -s`# " > set filec > - set history = 100 > - set savehist = 100 > + set history = 1 > + set savehist = 1 > + set autolist > + # Use history to aid expansion > + set autoexpand > set mail = (/var/mail/$USER) > if ( $?tcsh ) then > bindkey "^W" backward-delete-word > bindkey -k up history-search-backward > bindkey -k down history-search-forward > endif > + set prompt = "[%n@%m]%c04%# " > + set promptchars = "%#" > endif > > -- > Eitan Adler > ___ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" > this is what I use, this based on somewhat, that I found before ~3 years in Internet + mostly rewrited and extended: http://oliverp.teteny.bme.hu/git/?p=base/tcshrc.git;a=tree ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Feb 10, 2012, at 2:12 PM, Andriy Gapon wrote: > I really hate the default behavior of less where you can't quit via ^C or via > paging through the end of file. It's readily tunable, by setenv'ing LESS variable to contain some of: -e or --quit-at-eof Causes less to automatically exit the second time it reaches end-of-file. By default, the only way to exit less is via the "q" command. -E or --QUIT-AT-EOF Causes less to automatically exit the first time it reaches end-of-file. -K or --quit-on-intr Causes less to exit immediately when an interrupt character (usually ^C) is typed. Normally, an interrupt character causes less to stop whatever it is doing and return to its command prompt. Note that use of this option makes it impossible to return to the command prompt from the "F" command. While we return folks to the regularly scheduled debate on fancier .cshrc setup, I think I'd be happier with some of these changes showing up as examples, and having people try them out and look for any unexpected side effects before adopting them wholesale into the default system-wide dot.cshrc template... Regards, -- -Chuck ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
[cc list trimmed] on 10/02/2012 18:25 Eitan Adler said the following: [snip] > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > /usr/local/bin $HOME/bin) > > setenv EDITOR vi > -setenv PAGER more > +setenv PAGER less > setenv BLOCKSIZE K > No one complained about this - it is almost certainly going to stay it > the final version. Not so fast there, partner :-) Give folks more time to react. I really hate the default behavior of less where you can't quit via ^C or via paging through the end of file. BTW, this is what I have here: setenv PAGER more setenv MORE'-e -R -Pm?f%f:stdin .?lbLine %lb:?pb%pb\%:?bbByte %bb:-... ?eEND' >set filec > - set history = 100 > - set savehist = 100 > + set history = 1 > + set savehist = 1 > > No one complained about this one - it is almost certainly going to > stay it the final version. 1 looks a bit too much. I recall using systems where setting this to 1 caused exiting from a shell to be a very long process. Maybe try 1000 first, before trying more. Also, I second a suggestion to add merge directive to savehist. -- Andriy Gapon ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 10 Feb 2012 19:41, "Alex Keda" wrote: > > On 10.02.2012 21:07, Chuck Burns wrote: >> >> set prompt = "[%n@%m]%c04%# " > > it's not needed > > need some as > alias ll ls -lAhG > alias ls ls -G Lscolors are an abomination. -F or nothing at all is better; remember some people will use white xterms etc. Chris > set autolist = TAB > bindkey "\e[3~" delete-char > > and other _really_ necessary settings > > > > complete chown 'p/1/u/' > > complete man'C/*/c/' > > complete service'n/*/`service -l`/' > need as example. may be in include file, may be in .cshrc > > ___ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" > ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 10.02.2012 21:07, Chuck Burns wrote: set prompt = "[%n@%m]%c04%# " it's not needed need some as alias ll ls -lAhG alias ls ls -G set autolist = TAB bindkey "\e[3~" delete-char and other _really_ necessary settings > complete chown 'p/1/u/' > complete man'C/*/c/' > complete service'n/*/`service -l`/' need as example. may be in include file, may be in .cshrc ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Am 10.02.2012 17:41, schrieb Gavin Atkinson: > 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 >> @@ -7,9 +7,10 @@ >> >> alias hhistory 25 >> alias jjobs -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. Those aliases are only meant for interactive use and should be hidden in batch shells, IMO. > 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"? Yes, having -F modify the output of "ls -1" is bad ... But "ls -l" is no replacement for "ls -F", in general. > 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. Well, it can ... There is no need to unalias a command: > alias ls ls -F > ls -d /etc /etc/ > \ls -d /etc /etc Just put a back-slash before the command to use the "pure" version ... Regards, STefan ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Fri, Feb 10, 2012 at 05:53:09PM +0200, Volodymyr Kostyrko wrote: > Eitan Adler wrote: > > set filec > > - set history = 100 > > - set savehist = 100 > > + set history = 1 > > + set savehist = 1 > > Just why not (1 merge)? > > > + set autolist > > + # Use history to aid expansion > > + set autoexpand > > set mail = (/var/mail/$USER) > > if ( $?tcsh ) then > > bindkey "^W" backward-delete-word > > bindkey -k up history-search-backward > > bindkey -k down history-search-forward > > endif > > + set prompt = "[%n@%m]%c04%# " > > + set promptchars = "%#" > > endif > > > > I'm fully against changing promptchars, that's pointless. Including more > useful data in prompt is good anyway, but why any [] around? I think > everything should be just a little more descriptive, like: > > set prompt = "%n@%m %c04%m%# " Agreed. Try to make it as short as possible, but not shorter. Remember to check whatever you've done on 80x25 screen. Eatting 25% of the width for the prompt isn't practical. -- Wojciech A. Koszek wkos...@freebsd.czest.pl http://FreeBSD.czest.pl/~wkoszek/ ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On czw, lut 09, 2012 at 11:50:06 -0700, Warren Block wrote: > On Fri, 10 Feb 2012, Gonzalo Nemmi wrote: > ` > > On Thu, Feb 9, 2012 at 9:52 PM, Eitan Adler wrote: > >> In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) > > >> there has been some discussion about changing the default cshrc file. > > In the same line that Wojciech on the PR ".cshrc should be updated for > > modern hardware" I always set this ones on /usr/share/skel/dot.cshrc > > > > bindkey "\e[1~" beginning-of-line #make Home key work; > > bindkey "\e[2~" overwrite-mode #make Ins key work; > > bindkey "\e[3~" delete-char #make Delete key work; > > bindkey "\e[4~" end-of-line #make End key work; > > > > Besides that I add an "if [ -d $HOME/bin ]" and add it to $PATH if it > > exists, but that has nothing to do with ".cshrc should be updated for > > modern hardware" ... it jsut comes in really handy. > > The question becomes "how much is too much?" For example, ever since a > thread in the forums showed examples of csh/tcsh autocompletion, I've > thought the default .cshrc should be stuffed with them. Not for typing > reduction so much as self-documenting commands like > > complete chown'p/1/u/' > complete man 'C/*/c/' > complete service 'n/*/`service -l`/' > > 'service' autocompletes with a list of services--it helps the user by > showing valid choices. Same with 'chown', it gives a list of users. > > Then there's this, which probably isn't quite right but has been useful > to me (thanks to forum members for help with it): > > complete make 'n@*@`make -pn | sed -n -E "/^[#_.\/[:blank:]]+/d; > /=/d; s/[[:blank:]]*:.*//gp;"`@' > > That completes with all lower-case make targets for the current > directory. > > Package operations are easier when the package names autocomplete: > > complete pkg_delete 'c/-/(i v D n p d f G x X r)/' \ > 'n@*@`ls /var/db/pkg`@' > complete pkg_info 'c/-/(a b v p q Q c d D f g i I j k K r R m L s o G O x > X e E l t V P)/' \ > 'n@*@`\ls -1 /var/db/pkg | sed s%/var/db/pkg/%%`@' > > There's lots more that could be done. Are they appropriate for a stock > .cshrc? Maybe now is the time. One of the solutions for this problem would be to have: "source /usr/share//csh/autocomplete.csh" in .cshrc. I don't know what the shell speed impact might be, however. -- Wojciech A. Koszek wkos...@freebsd.czest.pl http://FreeBSD.czest.pl/~wkoszek/ ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Fri, Feb 10, 2012 at 11:41 PM, Gavin Atkinson wrote: > This change is disruptive, and it can affect use of ls(1) in scripts. Scripts never use alias and... > 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 ...actually, don't ever parse ls output. http://mywiki.wooledge.org/ParsingLs > command line with "-f". The "ls -F" change cannot be overridden without > unaliasing. > Try prepending the command with backslash to run unaliased command. \ls -- O< ascii ribbon campaign - stop html mail - www.asciiribbon.org ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Fri, Feb 10, 2012 at 9:07 AM, Chuck Burns 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 >>> @@ -7,9 +7,10 @@ >>> >>> 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@%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@%m:%c04 %# " >> and not >> set prompt = "[%n@%m]%c04%# " >> >> as that then gives you user@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: kob6...@gmail.com ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
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 @@ -7,9 +7,10 @@ alias hhistory 25 alias jjobs -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@%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@%m:%c04 %# " and not set prompt = "[%n@%m]%c04%# " as that then gives you user@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" :) -- Chuck Burns The Southern Libertarian (owner/editor) http://www.thesouthernlibertarian.com/ ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
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 > @@ -7,9 +7,10 @@ > > alias hhistory 25 > alias jjobs -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@%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@%m:%c04 %# " and not set prompt = "[%n@%m]%c04%# " as that then gives you user@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. Gavin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Picking a random email to reply to. My goal with this email is to reduce the amount of "controversial" changes. commit 3ea4ea3a59d14cb060244618dd89d7dd0170bee1 diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc --- a/etc/root/dot.cshrc +++ b/etc/root/dot.cshrc @@ -7,9 +7,10 @@ alias hhistory 25 alias jjobs -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? # A righteous umask umask 22 @@ -17,15 +18,19 @@ umask 22 set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin) setenv EDITOR vi -setenv PAGER more +setenv PAGER less setenv BLOCKSIZE K No one complained about this - it is almost certainly going to stay it the final version. if ($?prompt) then # An interactive shell -- set some stuff up - set prompt = "`/bin/hostname -s`# " + set prompt = "[%n@%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? While many admins are able to deal with short non-descriptive prompts it helps new users to have more detail on the prompt line. I'd like to commit some change to the default: currently it is very undescriptive. I am leaving open which prompt I am going with at the end though. set filec - set history = 100 - set savehist = 100 + set history = 1 + set savehist = 1 No one complained about this one - it is almost certainly going to stay it the final version. + set autolist set autolist=ambiguous makes sense here - I will likely go with that. + # Use history to aid expansion + set autoexpand No one complained about this - it is almost certainly going to stay it the final version. Now to address some comments made in the thread. I'm sorry for not preserving attribution here. > How about adding stuff like this to /usr/share/examples/tcsh/complete.tcsh ? > Along with a comment in .cshrc pointing to that file (or even a commented > line to source it), it would be an improvement. +1 I'll add a comment addressing this file. > 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. > The main problem of this is: novice user don't know how to enable some > "advanced" settings for default FreeBSD shell (csh / tcsh) or even don't know > they exist. This is why I want to make the defaults a little bit nicer. > I think that default FreeBSD install should be more friendly to new users. +1 > That's why I am propossing better support of command completion "out of the > box". > ... I am fine with this change. It is better than nothing. :) Good. Lets start with incremental positive steps :) >If tcsh could be updated to version 6.18.00 "set autorehash" would be >really nice. With that you'll never have to type "rehash" again. :) This would solve one of the most frequently asked questions on the mailing list and IRC channel. Is there any objection to setting this once tcsh is updated? > The question becomes "how much is too much?" This is why I want to keep my patch minimal. It is better at this moment to miss a few good changes to the default tcsh than make a large number of bad ones. We could always edit the file again if we find a better set of defaults. -- Eitan Adler ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Eitan Adler wrote: set filec - set history = 100 - set savehist = 100 + set history = 1 + set savehist = 1 Just why not (1 merge)? + set autolist + # Use history to aid expansion + set autoexpand set mail = (/var/mail/$USER) if ( $?tcsh ) then bindkey "^W" backward-delete-word bindkey -k up history-search-backward bindkey -k down history-search-forward endif + set prompt = "[%n@%m]%c04%# " + set promptchars = "%#" endif I'm fully against changing promptchars, that's pointless. Including more useful data in prompt is good anyway, but why any [] around? I think everything should be just a little more descriptive, like: set prompt = "%n@%m %c04%m%# " -- Sphinx of black quartz judge my vow. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 10 Feb 2012 14:58, "Erich Dollansky" wrote: > > Hi Eitan, > > On Friday 10 February 2012 21:03:52 Eitan Adler wrote: > > Picking a random person to reply to. > > > > There are a lot of good suggestions in this thread, but can we please > > remember a few things: > > > > - Users can always add their own ~/.cshrc > > - Many users will get annoyed by what is someone else's amazing setup > > sorry for going a bit far off your route. > > > > The changes I proposed were designed to add value while continuing to > > be non-annoying to the vast majority of users. I'd like feedback about > > the specific patch I proposed. We can also create a wiki page for > > more awesome tcsh examples. > > > > For the record this is the current version of the patch I'd like to > > commit: Note that it slightly changed from the original (I removed the > > duplicate prompt setup and reorganized where the edits are made to > > make the diff look nicer). > > > > commit 3ea4ea3a59d14cb060244618dd89d7dd0170bee1 > > diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc > > --- a/etc/root/dot.cshrc > > +++ b/etc/root/dot.cshrc > > @@ -7,9 +7,10 @@ > > > > alias h history 25 > > alias j jobs -l > > -alias la ls -a > > +alias la ls -aF > > ok, makes sense. > > > alias lf ls -FA > > -alias ll ls -lA > > +alias ll ls -lAF > > +alias ls ls -F > > > ok, makes sense. > > > # A righteous umask > > umask 22 > > @@ -17,15 +18,19 @@ umask 22 > > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > > /usr/local/bin $HOME/bin) > > I use the $HOME/bin on my machines but I am not so sure to make this a general thing. > > > > > setenv EDITOR vi > > -setenv PAGER more > > +setenv PAGER less > > setenv BLOCKSIZE K > > ok, makes sense. > > > > > if ($?prompt) then > > # An interactive shell -- set some stuff up > > - set prompt = "`/bin/hostname -s`# " > > + set prompt = "[%n@%m]%c04%# " > > + set promptchars = "%#" > > I would add a > >set ellipsis > > here. It makes the prompt shorter when needed. > Hence the %c04 modification to the path :) Chris ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Thu, 2012-02-09 at 19:52 -0500, Eitan Adler wrote: > In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) > there has been some discussion about changing the default cshrc file. > > I'd like to commit something like the following based on Chris's patch > at the end of the thread. This post is an attempt to open the change > to wider discussion. > > commit dbe6cb730686dd53af7d06cc9b69b60e6e55549c > diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc > --- a/etc/root/dot.cshrc > +++ b/etc/root/dot.cshrc > @@ -7,9 +7,10 @@ > > 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 Please, no. > # A righteous umask > umask 22 > @@ -17,19 +18,24 @@ umask 22 > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > /usr/local/bin $HOME/bin) > > setenv EDITOR vi > -setenv PAGER more > +setenv PAGER less > setenv BLOCKSIZE K Probably sensible. > if ($?prompt) then > # An interactive shell -- set some stuff up > set prompt = "`/bin/hostname -s`# " > set filec > - set history = 100 > - set savehist = 100 > + set history = 1 > + set savehist = 1 > + set autolist I think it'd be better for this to be "set autolist=ambiguous" - it changes an accidental keypress into a deliberate choice, and matches Linux a bit better. > + # Use history to aid expansion > + set autoexpand > set mail = (/var/mail/$USER) > if ( $?tcsh ) then > bindkey "^W" backward-delete-word > bindkey -k up history-search-backward > bindkey -k down history-search-forward > endif > + set prompt = "[%n@%m]%c04%# " > + set promptchars = "%#" > endif I always override the prompt anyway. My personal favourite is set prompt="%B%n@`hostname -s`%b:%/ %h% " but I see no real problem with the suggested prompt (although set prompt = "%n@%m:%c04%# " would at least save one character. Gavin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Fri, 10 Feb 2012, Joel Dahl wrote: [completion examples] How about adding stuff like this to /usr/share/examples/tcsh/complete.tcsh ? Along with a comment in .cshrc pointing to that file (or even a commented line to source it), it would be an improvement. People who can benefit the most from the self-documenting aspect of command completion are the same ones that don't know how much it can help. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Hi Eitan, On Friday 10 February 2012 21:03:52 Eitan Adler wrote: > Picking a random person to reply to. > > There are a lot of good suggestions in this thread, but can we please > remember a few things: > > - Users can always add their own ~/.cshrc > - Many users will get annoyed by what is someone else's amazing setup sorry for going a bit far off your route. > > The changes I proposed were designed to add value while continuing to > be non-annoying to the vast majority of users. I'd like feedback about > the specific patch I proposed. We can also create a wiki page for > more awesome tcsh examples. > > For the record this is the current version of the patch I'd like to > commit: Note that it slightly changed from the original (I removed the > duplicate prompt setup and reorganized where the edits are made to > make the diff look nicer). > > commit 3ea4ea3a59d14cb060244618dd89d7dd0170bee1 > diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc > --- a/etc/root/dot.cshrc > +++ b/etc/root/dot.cshrc > @@ -7,9 +7,10 @@ > > alias h history 25 > alias j jobs -l > -alias la ls -a > +alias la ls -aF ok, makes sense. > alias lf ls -FA > -alias ll ls -lA > +alias ll ls -lAF > +alias ls ls -F > ok, makes sense. > # A righteous umask > umask 22 > @@ -17,15 +18,19 @@ umask 22 > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > /usr/local/bin $HOME/bin) I use the $HOME/bin on my machines but I am not so sure to make this a general thing. > > setenv EDITOR vi > -setenv PAGER more > +setenv PAGER less > setenv BLOCKSIZE K ok, makes sense. > > if ($?prompt) then > # An interactive shell -- set some stuff up > - set prompt = "`/bin/hostname -s`# " > + set prompt = "[%n@%m]%c04%# " > + set promptchars = "%#" I would add a set ellipsis here. It makes the prompt shorter when needed. > set filec > - set history = 100 > - set savehist = 100 > + set history = 1 > + set savehist = 1 > + set autolist > + # Use history to aid expansion > + set autoexpand > set mail = (/var/mail/$USER) > if ( $?tcsh ) then > bindkey "^W" backward-delete-word > Ok again. Erich > > > > -- > Eitan Adler > > ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Fri, Feb 10, 2012 at 09:03:52AM -0500, Eitan Adler wrote: > Picking a random person to reply to. > > There are a lot of good suggestions in this thread, but can we please > remember a few things: > > - Users can always add their own ~/.cshrc > - Many users will get annoyed by what is someone else's amazing setup > > The changes I proposed were designed to add value while continuing to > be non-annoying to the vast majority of users. I'd like feedback about > the specific patch I proposed. We can also create a wiki page for > more awesome tcsh examples. > > For the record this is the current version of the patch I'd like to > commit: Note that it slightly changed from the original (I removed the > duplicate prompt setup and reorganized where the edits are made to > make the diff look nicer). > > commit 3ea4ea3a59d14cb060244618dd89d7dd0170bee1 > diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc > --- a/etc/root/dot.cshrc > +++ b/etc/root/dot.cshrc > @@ -7,9 +7,10 @@ > > 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 > > # A righteous umask > umask 22 > @@ -17,15 +18,19 @@ umask 22 > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > /usr/local/bin $HOME/bin) > > setenv EDITOR vi > -setenv PAGER more > +setenv PAGER less > setenv BLOCKSIZE K > > if ($?prompt) then > # An interactive shell -- set some stuff up > - set prompt = "`/bin/hostname -s`# " > + set prompt = "[%n@%m]%c04%# " > + set promptchars = "%#" > set filec > - set history = 100 > - set savehist = 100 > + set history = 1 > + set savehist = 1 > + set autolist > + # Use history to aid expansion > + set autoexpand > set mail = (/var/mail/$USER) > if ( $?tcsh ) then > bindkey "^W" backward-delete-word yes to the history improvements no to the prompt changes don't care for aliases - I never use these particular ones. -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Eitan Adler wrote: Picking a random person to reply to. There are a lot of good suggestions in this thread, but can we please remember a few things: - Users can always add their own ~/.cshrc - Many users will get annoyed by what is someone else's amazing setup The main problem of this is: novice user don't know how to enable some "advanced" settings for default FreeBSD shell (csh / tcsh) or even don't know they exist. But all skilled persons are able to disable "annoing" new settings in few seconds. I think that default FreeBSD install should be more friendly to new users. That's why I am propossing better support of command completion "out of the box". (I will still use my own set of changes in rc files which I am deploying in a first step on all our machines) [...] For the record this is the current version of the patch I'd like to commit: Note that it slightly changed from the original (I removed the duplicate prompt setup and reorganized where the edits are made to make the diff look nicer). commit 3ea4ea3a59d14cb060244618dd89d7dd0170bee1 diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc --- a/etc/root/dot.cshrc +++ b/etc/root/dot.cshrc @@ -7,9 +7,10 @@ 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 # A righteous umask umask 22 @@ -17,15 +18,19 @@ umask 22 set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin) setenvEDITOR vi -setenv PAGER more +setenv PAGER less setenvBLOCKSIZE K if ($?prompt) then # An interactive shell -- set some stuff up - set prompt = "`/bin/hostname -s`# " + set prompt = "[%n@%m]%c04%# " + set promptchars = "%#" set filec - set history = 100 - set savehist = 100 + set history = 1 + set savehist = 1 + set autolist + # Use history to aid expansion + set autoexpand set mail = (/var/mail/$USER) if ( $?tcsh ) then bindkey "^W" backward-delete-word I am fine with this change. It is better than nothing. :) Miroslav Lachman ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Picking a random person to reply to. There are a lot of good suggestions in this thread, but can we please remember a few things: - Users can always add their own ~/.cshrc - Many users will get annoyed by what is someone else's amazing setup The changes I proposed were designed to add value while continuing to be non-annoying to the vast majority of users. I'd like feedback about the specific patch I proposed. We can also create a wiki page for more awesome tcsh examples. For the record this is the current version of the patch I'd like to commit: Note that it slightly changed from the original (I removed the duplicate prompt setup and reorganized where the edits are made to make the diff look nicer). commit 3ea4ea3a59d14cb060244618dd89d7dd0170bee1 diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc --- a/etc/root/dot.cshrc +++ b/etc/root/dot.cshrc @@ -7,9 +7,10 @@ alias hhistory 25 alias jjobs -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 # A righteous umask umask 22 @@ -17,15 +18,19 @@ umask 22 set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin) setenv EDITOR vi -setenv PAGER more +setenv PAGER less setenv BLOCKSIZE K if ($?prompt) then # An interactive shell -- set some stuff up - set prompt = "`/bin/hostname -s`# " + set prompt = "[%n@%m]%c04%# " + set promptchars = "%#" set filec - set history = 100 - set savehist = 100 + set history = 1 + set savehist = 1 + set autolist + # Use history to aid expansion + set autoexpand set mail = (/var/mail/$USER) if ( $?tcsh ) then bindkey "^W" backward-delete-word -- Eitan Adler ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Hi, On Friday 10 February 2012 19:36:29 Alexander Leidinger wrote: > Quoting Miroslav Lachman <000.f...@quip.cz> (from Fri, 10 Feb 2012 > 12:05:59 +0100): > > > I would like to share them with others, if there are interrest to > > include it in stock FreeBSD base. > > If there's no interest, or no consent to add a specific one, why not > collect them in a wiki-page? this is a good idea as this can be easily updated by everybody and does not put any load onto the project itself. One note in the make file would do. Erich > > Bye, > Alexander. > > -- > BOFH excuse #306: > > CPU-angle has to be adjusted because of vibrations coming from the nearby road > > http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7 > http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 > > ___ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" > > ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Quoting Miroslav Lachman <000.f...@quip.cz> (from Fri, 10 Feb 2012 12:05:59 +0100): I would like to share them with others, if there are interrest to include it in stock FreeBSD base. If there's no interest, or no consent to add a specific one, why not collect them in a wiki-page? Bye, Alexander. -- BOFH excuse #306: CPU-angle has to be adjusted because of vibrations coming from the nearby road http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 09-02-2012 23:50, Warren Block wrote: > On Fri, 10 Feb 2012, Gonzalo Nemmi wrote: > > > On Thu, Feb 9, 2012 at 9:52 PM, Eitan Adler wrote: > >> In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) > > >> there has been some discussion about changing the default cshrc file. > > In the same line that Wojciech on the PR ".cshrc should be updated for > > modern hardware" I always set this ones on /usr/share/skel/dot.cshrc > > > > bindkey "\e[1~" beginning-of-line #make Home key work; > > bindkey "\e[2~" overwrite-mode #make Ins key work; > > bindkey "\e[3~" delete-char #make Delete key work; > > bindkey "\e[4~" end-of-line #make End key work; > > > > Besides that I add an "if [ -d $HOME/bin ]" and add it to $PATH if it > > exists, but that has nothing to do with ".cshrc should be updated for > > modern hardware" ... it jsut comes in really handy. > > The question becomes "how much is too much?" For example, ever since a > thread in the forums showed examples of csh/tcsh autocompletion, I've > thought the default .cshrc should be stuffed with them. Not for typing > reduction so much as self-documenting commands like > > complete chown'p/1/u/' > complete man 'C/*/c/' > complete service 'n/*/`service -l`/' > > 'service' autocompletes with a list of services--it helps the user by > showing valid choices. Same with 'chown', it gives a list of users. > > Then there's this, which probably isn't quite right but has been useful > to me (thanks to forum members for help with it): > > complete make 'n@*@`make -pn | sed -n -E "/^[#_.\/[:blank:]]+/d; > /=/d; s/[[:blank:]]*:.*//gp;"`@' > > That completes with all lower-case make targets for the current > directory. > > Package operations are easier when the package names autocomplete: > > complete pkg_delete 'c/-/(i v D n p d f G x X r)/' \ > 'n@*@`ls /var/db/pkg`@' > complete pkg_info 'c/-/(a b v p q Q c d D f g i I j k K r R m L s o G O x > X e E l t V P)/' \ > 'n@*@`\ls -1 /var/db/pkg | sed s%/var/db/pkg/%%`@' How about adding stuff like this to /usr/share/examples/tcsh/complete.tcsh ? -- Joel ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Erich Dollansky wrote: Hi, On Friday 10 February 2012 18:05:59 Miroslav Lachman wrote: Warren Block wrote: On Fri, 10 Feb 2012, Gonzalo Nemmi wrote: I would like to share them with others, if there are interrest to include it in stock FreeBSD base. just publish them at least here. It will always be helpful for beginners and also for people like me who use BSD since years but did not see certain options tcsh has. OK, here it is http://freebsd.quip.cz/ext/2012/2012-02-10-tcshrc/ It is based on tcshrc files found on the net, so it is not all my work. The files include many commented out lines as I change them over time. You can use it as inspiration for your own set of useful cahnges in you tcshrc files. Miroslav Lachman ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Hi, On Friday 10 February 2012 18:05:59 Miroslav Lachman wrote: > Warren Block wrote: > > On Fri, 10 Feb 2012, Gonzalo Nemmi wrote: > > > > I would like to share them with others, if there are interrest to > include it in stock FreeBSD base. > just publish them at least here. It will always be helpful for beginners and also for people like me who use BSD since years but did not see certain options tcsh has. Erich ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Hi, On Friday 10 February 2012 13:50:06 Warren Block wrote: > On Fri, 10 Feb 2012, Gonzalo Nemmi wrote: > > > On Thu, Feb 9, 2012 at 9:52 PM, Eitan Adler wrote: > >> In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) > > The question becomes "how much is too much?" For example, ever since a why not make an example rc file and let the users chose from? > complete chown'p/1/u/' > complete man 'C/*/c/' > complete service 'n/*/`service -l`/' I have the habit to collect things like this and add it to my installations from time to time. I watch then how it develops. Some have disturbing side effects to a person's working style. These will be removed later. Others stay then. Erich ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Warren Block wrote: On Fri, 10 Feb 2012, Gonzalo Nemmi wrote: On Thu, Feb 9, 2012 at 9:52 PM, Eitan Adler wrote: In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) there has been some discussion about changing the default cshrc file. In the same line that Wojciech on the PR ".cshrc should be updated for modern hardware" I always set this ones on /usr/share/skel/dot.cshrc bindkey "\e[1~" beginning-of-line #make Home key work; bindkey "\e[2~" overwrite-mode #make Ins key work; bindkey "\e[3~" delete-char #make Delete key work; bindkey "\e[4~" end-of-line #make End key work; Besides that I add an "if [ -d $HOME/bin ]" and add it to $PATH if it exists, but that has nothing to do with ".cshrc should be updated for modern hardware" ... it jsut comes in really handy. The question becomes "how much is too much?" For example, ever since a thread in the forums showed examples of csh/tcsh autocompletion, I've thought the default .cshrc should be stuffed with them. Not for typing reduction so much as self-documenting commands like complete chown 'p/1/u/' complete man 'C/*/c/' complete service 'n/*/`service -l`/' 'service' autocompletes with a list of services--it helps the user by showing valid choices. Same with 'chown', it gives a list of users. Then there's this, which probably isn't quite right but has been useful to me (thanks to forum members for help with it): complete make 'n@*@`make -pn | sed -n -E "/^[#_.\/[:blank:]]+/d; /=/d; s/[[:blank:]]*:.*//gp;"`@' That completes with all lower-case make targets for the current directory. Package operations are easier when the package names autocomplete: complete pkg_delete 'c/-/(i v D n p d f G x X r)/' \ 'n@*@`ls /var/db/pkg`@' complete pkg_info 'c/-/(a b v p q Q c d D f g i I j k K r R m L s o G O x X e E l t V P)/' \ 'n@*@`\ls -1 /var/db/pkg | sed s%/var/db/pkg/%%`@' There's lots more that could be done. Are they appropriate for a stock .cshrc? Maybe now is the time. I am +1 for better support of command autocompletion for FreeBSD specific commands. For example, I have this for services complete service 'c/-/(e l r v)/' 'p/1/`service -l`/' 'n/*/(start stop reload restart status rcvar onestart onestop)/' Something for kernel modules complete kldload 'n@*@`ls -1 /boot/modules/ /boot/kernel/ | awk -F/ \$NF\ \~\ \".ko\"\ \{sub\(\/\.ko\/,\"\",\$NF\)\;print\ \$NF\}`@' complete kldunload 'n@*@`kldstat | awk \{sub\(\/\.ko\/,\"\",\$NF\)\;print\ \$NF\} | grep -v Name`@' complete kill 'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '"'"'{print $1}'"'"'`/' complete killall 'c/-/S/' 'c/%/j/' 'n/*/`ps -axc | awk '"'"'{print $5}'"'"'`/' Or for portmaster alias _PKGS_PkGs_PoRtS_ 'awk -F\| \{sub\(\"\/usr\/ports\/\"\,\"\"\,\$2\)\;print\ \$2\} /usr/ports/INDEX-`uname -r | cut -d . -f 1` && pkg_info -E \*' complete portmaster 'c/--/(always-fetch check-depends check-port-dbdir clean-distfiles \ clean-packages delete-build-only delete-packages force-config help \ index index-first index-only list-origins local-packagedir no-confirm \ no-index-fetch no-term-title packages packages-build packages-if-newer \ packages-local packages-only show-work update-if-newer version)/' \ 'c/-/(a b B C d D e f F g G h H i l L m n o p r R s t u v w x)/' \ 'n@*@`_PKGS_PkGs_PoRtS_`@' The alias is there because same list of ports and packages are used for other pkg / ports commands (portupgrade, pkg_info, pkg_delete, pkg_tree, portell etc...) I have collected completion for about 50 commands like: vim, where, which, dd, find, man, limit, kill, bzip2, camcontrol, ifconfig, postfix, postmap, mount, su, sed, sysctl, make etc.. Come of them are rough and need some tweaks. I would like to share them with others, if there are interrest to include it in stock FreeBSD base. And if we are talking about better completion and history support, what about following? set history=1 set histdup=prev set savehist=(1 merge) set autolist=ambiguous set autocorrect set autoexpand set complete set correct=cmd set color set colorcat set filec At last - if you are using screen or tmux and what properly saved and merged history from all screens after logout, you need to add history -S to the ~.logout file. Otherwise I have saved history only from last screen window. Miroslav Lachman ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
> If tcsh could be updated to version 6.18.00 "set autorehash" would be > really nice. With that you'll never have to type "rehash" again. :) Yes please! Steinar Haug, Nethelp consulting, sth...@nethelp.no ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Thu, 9 Feb 2012 19:52:58 -0500 Eitan Adler wrote: > In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) > there has been some discussion about changing the default cshrc file. > > I'd like to commit something like the following based on Chris's patch > at the end of the thread. This post is an attempt to open the change > to wider discussion. If tcsh could be updated to version 6.18.00 "set autorehash" would be really nice. With that you'll never have to type "rehash" again. :) -- Homepage: www.yamagi.org XMPP: yam...@yamagi.org GnuPG/GPG: 0xEFBCCBCB pgpABK04OhsZS.pgp Description: PGP signature
Re: Enhancing the user experience with tcsh
On Thu, Feb 9, 2012 at 6:52 PM, Eitan Adler wrote: > In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) > there has been some discussion about changing the default cshrc file. > > I'd like to commit something like the following based on Chris's patch > at the end of the thread. This post is an attempt to open the change > to wider discussion. > > commit dbe6cb730686dd53af7d06cc9b69b60e6e55549c > diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc > --- a/etc/root/dot.cshrc > +++ b/etc/root/dot.cshrc > @@ -7,9 +7,10 @@ > > alias hhistory 25 > alias jjobs -l > -alias la ls -a > +alias la ls -aF > alias lf ls -FA > -alias ll ls -lA > +alias ll ls -lAF > > I don't like the change to alias ll. I use it frequently and the proposed change makes it less readable. Otherwise, these mostly seem overdue. -- Adam Vande More ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 09-02-2012 19:52, Eitan Adler wrote: > In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) > there has been some discussion about changing the default cshrc file. > > I'd like to commit something like the following based on Chris's patch > at the end of the thread. This post is an attempt to open the change > to wider discussion. > + set autolist > + # Use history to aid expansion > + set autoexpand +1 for autolist and autoexpand. -- Joel ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Fri, 10 Feb 2012, Gonzalo Nemmi wrote: On Thu, Feb 9, 2012 at 9:52 PM, Eitan Adler wrote: In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) there has been some discussion about changing the default cshrc file. In the same line that Wojciech on the PR ".cshrc should be updated for modern hardware" I always set this ones on /usr/share/skel/dot.cshrc bindkey "\e[1~" beginning-of-line #make Home key work; bindkey "\e[2~" overwrite-mode #make Ins key work; bindkey "\e[3~" delete-char #make Delete key work; bindkey "\e[4~" end-of-line #make End key work; Besides that I add an "if [ -d $HOME/bin ]" and add it to $PATH if it exists, but that has nothing to do with ".cshrc should be updated for modern hardware" ... it jsut comes in really handy. The question becomes "how much is too much?" For example, ever since a thread in the forums showed examples of csh/tcsh autocompletion, I've thought the default .cshrc should be stuffed with them. Not for typing reduction so much as self-documenting commands like complete chown 'p/1/u/' complete man'C/*/c/' complete service'n/*/`service -l`/' 'service' autocompletes with a list of services--it helps the user by showing valid choices. Same with 'chown', it gives a list of users. Then there's this, which probably isn't quite right but has been useful to me (thanks to forum members for help with it): complete make 'n@*@`make -pn | sed -n -E "/^[#_.\/[:blank:]]+/d; /=/d; s/[[:blank:]]*:.*//gp;"`@' That completes with all lower-case make targets for the current directory. Package operations are easier when the package names autocomplete: complete pkg_delete 'c/-/(i v D n p d f G x X r)/' \ 'n@*@`ls /var/db/pkg`@' complete pkg_info 'c/-/(a b v p q Q c d D f g i I j k K r R m L s o G O x X e E l t V P)/' \ 'n@*@`\ls -1 /var/db/pkg | sed s%/var/db/pkg/%%`@' There's lots more that could be done. Are they appropriate for a stock .cshrc? Maybe now is the time. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Thu, 9 Feb 2012 19:52:58 -0500 Eitan Adler wrote: > In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) > there has been some discussion about changing the default cshrc file. > > I'd like to commit something like the following based on Chris's patch > at the end of the thread. This post is an attempt to open the change > to wider discussion. > > commit dbe6cb730686dd53af7d06cc9b69b60e6e55549c > diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc > --- a/etc/root/dot.cshrc > +++ b/etc/root/dot.cshrc > @@ -7,9 +7,10 @@ > > 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 > > # A righteous umask > umask 22 > @@ -17,19 +18,24 @@ umask 22 > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > /usr/local/bin $HOME/bin) > > setenv EDITOR vi > -setenv PAGER more > +setenv PAGER less > setenv BLOCKSIZE K > > if ($?prompt) then > # An interactive shell -- set some stuff up > set prompt = "`/bin/hostname -s`# " > set filec > - set history = 100 > - set savehist = 100 > + set history = 1 > + set savehist = 1 > + set autolist > + # Use history to aid expansion > + set autoexpand > set mail = (/var/mail/$USER) > if ( $?tcsh ) then > bindkey "^W" backward-delete-word > bindkey -k up history-search-backward > bindkey -k down history-search-forward > endif > + set prompt = "[%n@%m]%c04%# " > + set promptchars = "%#" > endif > what are you thinking about: +bindkey "^F" forward-word + bindkey "^B" backward-word ? -- wbr, tiger ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On Thu, Feb 9, 2012 at 9:52 PM, Eitan Adler wrote: > In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) > there has been some discussion about changing the default cshrc file. > > I'd like to commit something like the following based on Chris's patch > at the end of the thread. This post is an attempt to open the change > to wider discussion. > > commit dbe6cb730686dd53af7d06cc9b69b60e6e55549c > diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc > --- a/etc/root/dot.cshrc > +++ b/etc/root/dot.cshrc > @@ -7,9 +7,10 @@ > > 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 > > # A righteous umask > umask 22 > @@ -17,19 +18,24 @@ umask 22 > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > /usr/local/bin $HOME/bin) > > setenv EDITOR vi > -setenv PAGER more > +setenv PAGER less > setenv BLOCKSIZE K > > if ($?prompt) then > # An interactive shell -- set some stuff up > set prompt = "`/bin/hostname -s`# " > set filec > - set history = 100 > - set savehist = 100 > + set history = 1 > + set savehist = 1 > + set autolist > + # Use history to aid expansion > + set autoexpand > set mail = (/var/mail/$USER) > if ( $?tcsh ) then > bindkey "^W" backward-delete-word > bindkey -k up history-search-backward > bindkey -k down history-search-forward > endif > + set prompt = "[%n@%m]%c04%# " > + set promptchars = "%#" > endif > In the same line that Wojciech on the PR ".cshrc should be updated for modern hardware" I always set this ones on /usr/share/skel/dot.cshrc bindkey "\e[1~" beginning-of-line #make Home key work; bindkey "\e[2~" overwrite-mode #make Ins key work; bindkey "\e[3~" delete-char #make Delete key work; bindkey "\e[4~" end-of-line #make End key work; Besides that I add an "if [ -d $HOME/bin ]" and add it to $PATH if it exists, but that has nothing to do with ".cshrc should be updated for modern hardware" ... it jsut comes in really handy. my 2 cents ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
On 02/10/12 11:52, Eitan Adler wrote: > In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) > there has been some discussion about changing the default cshrc file. > > I'd like to commit something like the following based on Chris's patch > at the end of the thread. This post is an attempt to open the change > to wider discussion. I like the proposed changes, although I don't see why you set the prompt twice? I've also inserted the changes I commonly run with inline below. > commit dbe6cb730686dd53af7d06cc9b69b60e6e55549c > diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc > --- a/etc/root/dot.cshrc > +++ b/etc/root/dot.cshrc > @@ -7,9 +7,10 @@ > > 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 > > # A righteous umask > umask 22 > @@ -17,19 +18,24 @@ umask 22 > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > /usr/local/bin $HOME/bin) > > setenv EDITOR vi > -setenv PAGER more > +setenv PAGER less > setenv BLOCKSIZE K # Sets SSH_AUTH_SOCK to the user's ssh-agent socket path if running if (${?SSH_AUTH_SOCK} != "1") then setenv SSH_AUTH_SOCK `sockstat | grep ${USER} | grep ssh-agent | awk '{print $6}'` endif > if ($?prompt) then > # An interactive shell -- set some stuff up > set prompt = "`/bin/hostname -s`# " # Useful for root's .cshrc, although I run with it in all my .cshrc if (`id -g` == 0) then set prompt="root@%m# " endif > set filec > - set history = 100 > - set savehist = 100 > + set history = 1 > + set savehist = 1 > + set autolist set autologout = 0 > + # Use history to aid expansion > + set autoexpand > set mail = (/var/mail/$USER) > if ( $?tcsh ) then > bindkey "^W" backward-delete-word > bindkey -k up history-search-backward > bindkey -k down history-search-forward # This maps the "Delete" key to do the right thing # Pressing CTRL-v followed by the key of interest will print the shell's mapping for the key bindkey "^[[3~" delete-char-or-list-or-eof > endif > + set prompt = "[%n@%m]%c04%# " > + set promptchars = "%#" > endif > Cheers, Lawrence ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Enhancing the user experience with tcsh
Do the promptchars work correctly on csh as well as tcsh? Adrian ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"