Re: svn commit: r342576 - head/share/skel

2018-12-28 Thread Yuri Pankov
Rodney W. Grimes wrote:
>> Author: trasz
>> Date: Fri Dec 28 17:50:40 2018
>> New Revision: 342576
>> URL: https://svnweb.freebsd.org/changeset/base/342576
>>
>> Log:
>>   Simplify the way we set the default sh(1) PS1.  No functional changes.
>>   
>>   Reviewed by:   jilles
>>   MFC after: 2 weeks
>>   Sponsored by:  DARPA, AFRL
>>   Differential Revision: https://reviews.freebsd.org/D18662
>>
>> Modified:
>>   head/share/skel/dot.shrc
>>
>> Modified: head/share/skel/dot.shrc
>> ==
>> --- head/share/skel/dot.shrc Fri Dec 28 17:00:12 2018(r342575)
>> +++ head/share/skel/dot.shrc Fri Dec 28 17:50:40 2018(r342576)
>> @@ -33,11 +33,7 @@ alias g='egrep -i'
>>  
>>  
>>  # # set prompt: ``username@hostname$ '' 
>> -# PS1="`whoami`@`hostname | sed 's/\..*//'`"
>> -# case `id -u` in
>> -#   0) PS1="${PS1}# ";;
>> -#   *) PS1="${PS1}$ ";;
>> -# esac
>> +# PS1="`whoami`@\h\\$ "
> 
> You lost the fact that for root the prompt ends in #

Note that '$' is not literal here.  '\$' is expanded to '$' for normal
users, and to '#' for superusers.

>>  
>>  # search path for cd(1)
>>  # CDPATH=:$HOME
>>
>>
> 




signature.asc
Description: OpenPGP digital signature


Re: svn commit: r342576 - head/share/skel

2018-12-28 Thread Rodney W. Grimes
> Author: trasz
> Date: Fri Dec 28 17:50:40 2018
> New Revision: 342576
> URL: https://svnweb.freebsd.org/changeset/base/342576
> 
> Log:
>   Simplify the way we set the default sh(1) PS1.  No functional changes.
>   
>   Reviewed by:jilles
>   MFC after:  2 weeks
>   Sponsored by:   DARPA, AFRL
>   Differential Revision:  https://reviews.freebsd.org/D18662
> 
> Modified:
>   head/share/skel/dot.shrc
> 
> Modified: head/share/skel/dot.shrc
> ==
> --- head/share/skel/dot.shrc  Fri Dec 28 17:00:12 2018(r342575)
> +++ head/share/skel/dot.shrc  Fri Dec 28 17:50:40 2018(r342576)
> @@ -33,11 +33,7 @@ alias g='egrep -i'
>  
>  
>  # # set prompt: ``username@hostname$ '' 
> -# PS1="`whoami`@`hostname | sed 's/\..*//'`"
> -# case `id -u` in
> -#0) PS1="${PS1}# ";;
> -#*) PS1="${PS1}$ ";;
> -# esac
> +# PS1="`whoami`@\h\\$ "

You lost the fact that for root the prompt ends in #

>  
>  # search path for cd(1)
>  # CDPATH=:$HOME
> 
> 

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r342576 - head/share/skel

2018-12-28 Thread Edward Tomasz Napierala
Author: trasz
Date: Fri Dec 28 17:50:40 2018
New Revision: 342576
URL: https://svnweb.freebsd.org/changeset/base/342576

Log:
  Simplify the way we set the default sh(1) PS1.  No functional changes.
  
  Reviewed by:  jilles
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D18662

Modified:
  head/share/skel/dot.shrc

Modified: head/share/skel/dot.shrc
==
--- head/share/skel/dot.shrcFri Dec 28 17:00:12 2018(r342575)
+++ head/share/skel/dot.shrcFri Dec 28 17:50:40 2018(r342576)
@@ -33,11 +33,7 @@ alias g='egrep -i'
 
 
 # # set prompt: ``username@hostname$ '' 
-# PS1="`whoami`@`hostname | sed 's/\..*//'`"
-# case `id -u` in
-#  0) PS1="${PS1}# ";;
-#  *) PS1="${PS1}$ ";;
-# esac
+# PS1="`whoami`@\h\\$ "
 
 # search path for cd(1)
 # CDPATH=:$HOME
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"