Changeset 0d7ec6f1 for postlfs/config/profile.xml
- Timestamp:
- 07/30/2007 07:23:41 PM (17 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 51fc891
- Parents:
- c7f6bfd7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
postlfs/config/profile.xml
rc7f6bfd7 r0d7ec6f1 141 141 export HISTSIZE=1000 142 142 export HISTIGNORE="&:[bf]g:exit" 143 #export PS1="[\u@\h \w]\\$ " 144 export PS1='\u@\h:\w\$ ' 143 144 # Setup a red prompt for root and a green one for users. 145 NORMAL="\[\e[0m\]" 146 RED="\[\e[1;31m\]" 147 GREEN="\[\e[1;32m\]" 148 if [[ $EUID == 0 ]] ; then 149 PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL" 150 else 151 PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL" 152 fi 145 153 146 154 for script in /etc/profile.d/*.sh ; do … … 296 304 </sect3> 297 305 298 <sect3 id="extra-prompt.sh">299 <title>/etc/profile.d/extra-prompt.sh</title>300 301 <indexterm zone="postlfs-config-profile extra-prompt.sh">302 <primary sortas="e-etc-profile.d-prompt.sh">/etc/profile.d/extra-prompt.sh</primary>303 </indexterm>304 305 <para>This script shows an example of a different way of setting the306 prompt. The normal variable, <envar>PS1</envar>, is supplemented by307 <envar>PROMPT_COMMAND</envar>. If set, the value of308 <envar>PROMPT_COMMAND</envar> is executed as a command prior to issuing309 each primary prompt. The sequence \e is an ESC character. \a is a310 BEL character. For a reference on <command>xterm</command> escape311 sequences, see <ulink312 url="http://rtfm.etla.org/xterm/ctlseq.html"/>.</para>313 314 <screen role="root"><userinput>cat > /etc/profile.d/extra-prompt.sh << "EOF"315 <literal>PROMPT_COMMAND='echo -ne "\e[1m${USER}@${HOSTNAME} : ${PWD}\e[0m\a"'316 export PROMPT_COMMAND</literal>317 EOF</userinput></screen>318 319 <para>The escape sequences above are BOLD, NORMAL, and BEL.</para>320 321 </sect3>322 323 306 <sect3 id="i18n.sh"> 324 <title> '/etc/profile.d/i18n.sh'</title>307 <title>/etc/profile.d/i18n.sh</title> 325 308 326 309 <indexterm zone="postlfs-config-profile i18n.sh"> … … 385 368 # addendum.] 386 369 387 #export PS1="[\u@\h \w]\\$ " 388 export PS1='\u@\h:\w\$ ' 370 NORMAL="\[\e[0m\]" 371 RED="\[\e[1;31m\]" 372 GREEN="\[\e[1;32m\]" 373 if [[ $EUID == 0 ]] ; then 374 PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL" 375 else 376 PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL" 377 fi 389 378 390 379 # End /etc/bashrc</literal>
Note:
See TracChangeset
for help on using the changeset viewer.