Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT →
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
utilisateurs:abdelqahar:config:bashrc [12/05/2016 16:24] AbdelQahar créée |
utilisateurs:abdelqahar:config:bashrc [17/05/2016 23:36] (Version actuelle) AbdelQahar |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | <file bash nom.sh> | + | <file bash .bashrc> |
# ~/.bashrc: executed by bash(1) for non-login shells. | # ~/.bashrc: executed by bash(1) for non-login shells. | ||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | ||
Ligne 58: | Ligne 58: | ||
fi | fi | ||
- | if [ "$color_prompt" = yes ]; then | + | function prompt { |
if [ $USER = 'root' ] | if [ $USER = 'root' ] | ||
then | then | ||
- | PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ ' | + | PS1=' # ' |
+ | echo -e "\n\033[01;31m$HOSTNAME\033[01;33m[$(date +%T)]\033[01;34m$PWD \033[00m\033[00;37m" | ||
else | else | ||
- | PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ ' | + | PS1=' $ ' |
+ | echo -e "\n\033[01;32m$USER@$HOSTNAME\033[01;33m[$(date +%T)]\033[01;34m$PWD \033[00m\033[00;37m" | ||
fi | fi | ||
+ | } | ||
+ | |||
+ | function truc { | ||
+ | PS1='>' | ||
+ | } | ||
+ | |||
+ | if [ "$color_prompt" = yes ]; then | ||
+ | PROMPT_COMMAND='prompt' | ||
else | else | ||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\W\$ ' | PS1='${debian_chroot:+($debian_chroot)}\u@\h:\W\$ ' | ||
fi | fi | ||
+ | |||
+ | #if [ "$color_prompt" = yes ]; then | ||
+ | # if [ $USER = 'root' ] | ||
+ | # then | ||
+ | # PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\# ' | ||
+ | # else | ||
+ | # PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ ' | ||
+ | # fi | ||
+ | #else | ||
+ | # PS1='${debian_chroot:+($debian_chroot)}\u@\h:\W\$ ' | ||
+ | #fi | ||
unset color_prompt force_color_prompt | unset color_prompt force_color_prompt | ||
Ligne 112: | Ligne 133: | ||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile | ||
# sources /etc/bash.bashrc). | # sources /etc/bash.bashrc). | ||
- | #if ! shopt -oq posix; then | + | if ! shopt -oq posix; then |
- | # if [ -f /usr/share/bash-completion/bash_completion ]; then | + | if [ -f /usr/share/bash-completion/bash_completion ]; then |
- | # . /usr/share/bash-completion/bash_completion | + | . /usr/share/bash-completion/bash_completion |
- | # elif [ -f /etc/bash_completion ]; then | + | elif [ -f /etc/bash_completion ]; then |
- | # . /etc/bash_completion | + | . /etc/bash_completion |
- | # fi | + | fi |
- | #fi | + | fi |
# | # | ||
#complete -cf sudo | #complete -cf sudo | ||
- | |||
</file> | </file> |