Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 17/05/2026, à 18:51

abecidofugy

-1% dans Invite de commande

Salut,

Voici comment se présente mon invite de prompt :

-1% 2026-05-17 18:45:24 ⌚  pc2 in ~

(par défaut, avec Bash-it installé)

À quoi correspond le -1%

Merci.
Pour info :

-1% 2026-05-17 18:45:24 ⌚  pc2 in ~
○ → cat .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color|*-256color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
        # We have color support; assume it's compliant with Ecma-48
        # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
        # a case would tend to support setf rather than setaf.)
        color_prompt=yes
    else
        color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi
# shellcheck disable=SC2034

# If not running interactively, don't do anything
case $- in
        *i*) ;;
        *) return ;;
esac

# Path to the bash it configuration
BASH_IT="/home/patrice/.bash_it"

# Lock and Load a custom theme file.
# Leave empty to disable theming.
# location "$BASH_IT"/themes/
export BASH_IT_THEME='bobby'

# Some themes can show whether `sudo` has a current token or not.
# Set `$THEME_CHECK_SUDO` to `true` to check every prompt:
#THEME_CHECK_SUDO='true'

# (Advanced): Change this to the name of your remote repo if you
# cloned bash-it with a remote other than origin such as `bash-it`.
#BASH_IT_REMOTE='bash-it'

# (Advanced): Change this to the name of the main development branch if
# you renamed it or if it was changed for some reason
#BASH_IT_DEVELOPMENT_BRANCH='master'

# Your place for hosting Git repos. I use this for private repos.
#GIT_HOSTING='git@git.domain.com'

# Don't check mail when opening terminal.
unset MAILCHECK

# Change this to your console based IRC client of choice.
export IRC_CLIENT='irssi'

# Set this to the command you use for todo.txt-cli
TODO="t"

# Set this to the location of your work or project folders
#BASH_IT_PROJECT_PATHS="${HOME}/Projects:/Volumes/work/src"

# Set this to false to turn off version control status checking within the prompt for all themes
#SCM_CHECK=true

# Set to actual location of gitstatus directory if installed
#SCM_GIT_GITSTATUS_DIR="$HOME/gitstatus"
# per default gitstatus uses 2 times as many threads as CPU cores, you can change this here if you must
#export GITSTATUS_NUM_THREADS=8

# If your theme use command duration, uncomment this to
# enable display of last command duration.
#BASH_IT_COMMAND_DURATION=true
# You can choose the minimum time in seconds before
# command duration is displayed.
#COMMAND_DURATION_MIN_SECONDS=1

# Set Xterm/screen/Tmux title with shortened command and directory.
# Uncomment this to set.
#SHORT_TERM_LINE=true

# Set vcprompt executable path for scm advance info in prompt (demula theme)
# https://github.com/djl/vcprompt
#VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt

# (Advanced): Uncomment this to make Bash-it reload itself automatically
# after enabling or disabling aliases, plugins, and completions.
# BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1

# Uncomment this to make Bash-it create alias reload.
# BASH_IT_RELOAD_LEGACY=1

# Load Bash It
source "${BASH_IT?}/bash_it.sh"

Merci de respecter la netiquette avant tout. Les bots et agents IA sont déjà assez pénibles…
KDE neon avec Zen Browser en mode compact. Fais des rapports de bugs stp pour un meilleur avenir.
abecidofugy

Hors ligne

#2 Le 17/05/2026, à 19:55

Watael

Re : -1% dans Invite de commande

une configuration de bash-it, probablement.

pourquoi tu l'as installé ?


Connected \o/
Welcome to sHell. · eval is evil.

Hors ligne

#3 Le 17/05/2026, à 20:13

abecidofugy

Re : -1% dans Invite de commande

Oui c’est ça, bash-it.

Je l’ai installé en mattant l‘invite prompt d’une amie (qui l’avait customisée). Moi j’ai laissé la config par défaut.


Merci de respecter la netiquette avant tout. Les bots et agents IA sont déjà assez pénibles…
KDE neon avec Zen Browser en mode compact. Fais des rapports de bugs stp pour un meilleur avenir.
abecidofugy

Hors ligne

#4 Le 17/05/2026, à 21:04

Watael

Re : -1% dans Invite de commande

que contient bash-it.sh ?


Connected \o/
Welcome to sHell. · eval is evil.

Hors ligne

#5 Le 17/05/2026, à 21:10

abecidofugy

Re : -1% dans Invite de commande

Ah ok, je ne regardais pas le bon fichier, haha.

Voici :

-1% 2026-05-17 21:07:22 ⌚  pc2 in ~/.bash_it
± |master ✓| → cat bash_it.sh 
#!/usr/bin/env bash
# shellcheck source-path=SCRIPTDIR/lib source-path=SCRIPTDIR/scripts
# shellcheck disable=SC2034

# Requires bash 3.2+ to install and run
# Skip loading if bash version is too old
if [[ "${BASH_VERSINFO[0]-}" -lt 3 ]] || [[ "${BASH_VERSINFO[0]-}" -eq 3 && "${BASH_VERSINFO[1]}" -lt 2 ]]; then
        echo "sorry, but the minimum version of BASH supported by bash_it is 3.2, consider upgrading?" >&2
        return 1
fi

# Initialize Bash It
BASH_IT_LOG_PREFIX="core: main: "
: "${BASH_IT:=${BASH_SOURCE%/*}}"
: "${BASH_IT_CUSTOM:=${BASH_IT}/custom}"
: "${CUSTOM_THEME_DIR:="${BASH_IT_CUSTOM}/themes"}"
: "${BASH_IT_BASHRC:=${BASH_SOURCE[${#BASH_SOURCE[@]}-1]}}"

# Load composure first, so we support function metadata
# shellcheck source-path=SCRIPTDIR/vendor/github.com/erichs/composure
source "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh"

# Extend composure with additional metadata functions
# shellcheck disable=SC2329
url() { :; }

# support 'plumbing' metadata
cite _about _param _example _group _author _version url
cite about-alias about-plugin about-completion

# Declare our end-of-main finishing hook, but don't use `declare`/`typeset`
_bash_it_library_finalize_hook=()

# We need to load logging module early in order to be able to log
source "${BASH_IT}/lib/log.bash"

# Load libraries
_log_debug "Loading libraries..."
for _bash_it_main_file_lib in "${BASH_IT}/lib"/*.bash; do
        _bash-it-log-prefix-by-path "${_bash_it_main_file_lib}"
        _log_debug "Loading library file..."
        # shellcheck disable=SC1090
        source "$_bash_it_main_file_lib"
        BASH_IT_LOG_PREFIX="core: main: "
done

# Load the global "enabled" directory, then enabled aliases, completion, plugins
# "_bash_it_main_file_type" param is empty so that files get sourced in glob order
for _bash_it_main_file_type in "" "aliases" "plugins" "completion"; do
        BASH_IT_LOG_PREFIX="core: reloader: "
        # shellcheck disable=SC2140
        source "${BASH_IT}/scripts/reloader.bash" ${_bash_it_main_file_type:+"skip" "$_bash_it_main_file_type"}
        BASH_IT_LOG_PREFIX="core: main: "
done

# Load theme, if a theme was set
# shellcheck source-path=SCRIPTDIR/themes
if [[ -n "${BASH_IT_THEME:-}" ]]; then
        _log_debug "Loading theme '${BASH_IT_THEME}'."
        BASH_IT_LOG_PREFIX="themes: githelpers: "
        source "${BASH_IT}/themes/githelpers.theme.bash"
        BASH_IT_LOG_PREFIX="themes: p4helpers: "
        source "${BASH_IT}/themes/p4helpers.theme.bash"
        BASH_IT_LOG_PREFIX="themes: base: "
        source "${BASH_IT}/themes/base.theme.bash"

        BASH_IT_LOG_PREFIX="lib: appearance: "
        # shellcheck disable=SC1090
        if [[ -f "${BASH_IT_THEME}" ]]; then
                source "${BASH_IT_THEME}"
        elif [[ -f "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" ]]; then
                source "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash"
        elif [[ -f "$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" ]]; then
                source "$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash"
        fi
fi

_log_debug "Loading custom aliases, completion, plugins..."
for _bash_it_main_file_type in "aliases" "completion" "plugins"; do
        _bash_it_main_file_custom="${BASH_IT}/${_bash_it_main_file_type}/custom.${_bash_it_main_file_type}.bash"
        if [[ -s "${_bash_it_main_file_custom}" ]]; then
                _bash-it-log-prefix-by-path "${_bash_it_main_file_custom}"
                _log_debug "Loading component..."
                # shellcheck disable=SC1090
                source "${_bash_it_main_file_custom}"
        fi
        BASH_IT_LOG_PREFIX="core: main: "
done

# Custom
_log_debug "Loading general custom files..."
for _bash_it_main_file_custom in "${BASH_IT_CUSTOM}"/*.bash "${BASH_IT_CUSTOM}"/*/*.bash; do
        if [[ -s "${_bash_it_main_file_custom}" ]]; then
                _bash-it-log-prefix-by-path "${_bash_it_main_file_custom}"
                _log_debug "Loading custom file..."
                # shellcheck disable=SC1090
                source "$_bash_it_main_file_custom"
        fi
        BASH_IT_LOG_PREFIX="core: main: "
done

if [[ -n "${PROMPT:-}" ]]; then
        PS1="${PROMPT}"
fi

# Adding Support for other OSes
if _command_exists gloobus-preview; then
        PREVIEW="gloobus-preview"
elif [[ -d /Applications/Preview.app ]]; then
        PREVIEW="/Applications/Preview.app"
else
        PREVIEW="less"
fi

# BASH_IT_RELOAD_LEGACY is set.
if [[ -n "${BASH_IT_RELOAD_LEGACY:-}" ]] && ! _command_exists reload; then
        # shellcheck disable=SC2139
        alias reload="builtin source '${BASH_IT_BASHRC?}'"
fi

for _bash_it_library_finalize_f in "${_bash_it_library_finalize_hook[@]:-}"; do
        eval "${_bash_it_library_finalize_f?}" # Use `eval` to achieve the same behavior as `$PROMPT_COMMAND`.
done
unset "${!_bash_it_library_finalize_@}" "${!_bash_it_main_file_@}"

Merci de respecter la netiquette avant tout. Les bots et agents IA sont déjà assez pénibles…
KDE neon avec Zen Browser en mode compact. Fais des rapports de bugs stp pour un meilleur avenir.
abecidofugy

Hors ligne

#6 Le 17/05/2026, à 21:37

Watael

Re : -1% dans Invite de commande

il faudrait regarder dans le fichier du thème que tu utilises (echo $BASH_IT_THEME) pour voir ce qui renvoie un pourcentage (la charge de la batterie, le volume audio...).

EDIT: ah! je viens de voir que tu utilises bobby !
il faudrait comparer la version dont tu disposes avec celle sur le dépôt git

Dernière modification par Watael (Le 17/05/2026, à 21:41)


Connected \o/
Welcome to sHell. · eval is evil.

Hors ligne

#7 Le 18/05/2026, à 14:01

abecidofugy

Re : -1% dans Invite de commande

@Watael : re ^^

Alors de Bash-it je n‘ai fait que l’install par défaut. Je n’ai rien paramétré. Tout ce que je voulais, c’était la complétion, et un prompt un peu plus verbeux que celui de bash au sortir de la boîte.

Tu n’utilises pas Bash-it ? Tu me conseillerais autre chose ?


Merci de respecter la netiquette avant tout. Les bots et agents IA sont déjà assez pénibles…
KDE neon avec Zen Browser en mode compact. Fais des rapports de bugs stp pour un meilleur avenir.
abecidofugy

Hors ligne

#8 Le 18/05/2026, à 14:37

Watael

Re : -1% dans Invite de commande

non, pas de bash-it, et rien d'autre que bash dans un terminal vim sur urxvt et quelques unes de ses extensions perl (ça me permet de réduire l'usage de la souris).

mon invite est très simple. Elle ne me sert qu'à savoir en tant que qui je suis connecté sur quelle machine et à m'avertir, par sa couleur, que j'ai un mail dans le spool.
j'ai une fonction qui désactive tout ça quand je développe une commande avant d'un faire un script; je n'ai alors plus qu'un signe dollar, blanc sur fond noir. Youhou, c'est la fête ! roll lol

c'est fonctionnel, ça me satisfait, je n'ai donc pas cherché autre chose.

j'ai vu récemment un émulateur de terminal comportant des effets/animations 3D.
mais c'est pas le petit rat animé qui va écrire les scripts. big_smile

Dernière modification par Watael (Le 18/05/2026, à 14:39)


Connected \o/
Welcome to sHell. · eval is evil.

Hors ligne