Page 1 sur 1
[zsh] command not found: parse_git_dirty- RESOLU
Publié : lun. 17 mars 2025, 13:04
par Breizil29
Bonjour à tous, dans un terminal j'ai le message cité dans le titre qui apparaît dès que je me déplace dans un fichier GIT et il mets un peu de temps a apparaître. C'est une config (Hyprland) que j'ai cloné sur Gitlab. Je veux bien supprimer le lien avec Gitlab, mais je ne maitrise pas du tout GIT.
Exemples :
Code : Tout sélectionner
gg@ArchLinux ~ cd .config/hypr/waybar
total 32K
drwxr-xr-x 3 gg gg 4.0K Mar 17 11:31 ./
drwxr-xr-x 19 gg gg 4.0K Mar 17 12:04 ../
-rw-rw-r-- 1 gg gg 6.3K Mar 17 11:02 config
drwxr-xr-x 2 gg gg 4.0K Mar 16 22:34 scripts/
-rwxrwxr-x 1 gg gg 135 Sep 8 2024 start*
-rw-rw-r-- 1 gg gg 7.7K Mar 17 11:31 style.css
zsh: command not found: parse_git_dirty
gg@ArchLinux ~/.config/hypr/waybar main ±
Code : Tout sélectionner
gg@ArchLinux ~ cd .config/zsh/themes
total 24K
drwxr-xr-x 2 gg gg 4.0K Mar 16 14:55 ./
drwxr-xr-x 5 gg gg 4.0K Mar 17 12:36 ../
-rw-r--r-- 1 gg gg 7.8K Sep 16 2023 agnoster.zsh-theme.zsh
-rw-r--r-- 1 gg gg 704 Sep 16 2023 funcky-zsh-theme.zsh
-rw-r--r-- 1 gg gg 603 Sep 16 2023 zsh-theme.zsh
gg@ArchLinux ~/.config/zsh/themes
Re: [zsh] command not found: parse_git_dirty
Publié : lun. 17 mars 2025, 14:09
par benjarobin
Bonjour,
je ne comprend pas pourquoi tu évoques Hyprland, et/ou gitlab dans ton message.
Actuellement ton zshrc (local ou global) essaye d'appeler la fonction parse_git_dirty
qui n'existe pas.
Je n'ai aucune idée de comment tu as configuré ton zsh, mais ta configuration est très certainement cassée.
Re: [zsh] command not found: parse_git_dirty
Publié : lun. 17 mars 2025, 15:21
par Breizil29
Voilà mon .zshrc :
Code : Tout sélectionner
#!/bin/zsh
export TERM="xterm-256color"
# completion cache path setup
typeset -g comppath="$HOME/.cache"
typeset -g compfile="$comppath/.zcompdump"
if [[ -d "$comppath" ]]; then
[[ -w "$compfile" ]] || rm -rf "$compfile" >/dev/null 2>&1
else
mkdir -p "$comppath"
fi
# zsh internal stuff
SHELL=$(which zsh || echo '/bin/zsh')
KEYTIMEOUT=1
export HISTSIZE=10000
export SAVEHIST=10000
HISTFILE="$HOME/.cache/.zsh_history"
# Including all subdirectories from our script folder in our PATH
#typeset -U PATH path
#SCRIPTDIR="$HOME/.local/bin"
#path+=("$SCRIPTDIR" "${SCRIPTDIR}"/*/)
#export PATH
####### catch non-zsh and non-interactive shells ######
[[ $- == *i* && $ZSH_VERSION ]] && SHELL=/usr/bin/zsh || return 0
for f in "$ZDOTDIR"/{settings,plugins}/*.zsh; do
source "$f" 2>/dev/null
done
# use cache history location when we are root
#[[ $(whoami) == 'root' ]] || HISTFILE=${XDG_CONFIG_HOME:-$HOME/.config}/zsh/.cache/zsh_history
autoload -Uz comptinit promptinit
promptinit
compinit -d ~/.cache/zcompdump-$ZSH_VERSION
####### reduce system calls for timezone ########
#typeset -gx TZ=:/etc/localtime
##### strip empty fields from the path ####
#path=("${path[@]:#}")
# Source prompt settings
source "$ZDOTDIR"/themes/agnoster.zsh-theme.zsh
#source "$ZDOTDIR"/themes/funcky-zsh-theme.zsh
#source /usr/lib/python3.13/site-packages/powerline/bindings/zsh/powerline.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
#PROMPT_USERFMT='%n%f@%F{red}%m'
#prompt adam2
cermic 1 ~/.cermic_repo/
Re: [zsh] command not found: parse_git_dirty
Publié : lun. 17 mars 2025, 15:42
par Breizil29
benjarobin a écrit : ↑lun. 17 mars 2025, 14:09
Bonjour,
je ne comprend pas pourquoi tu évoques Hyprland, et/ou gitlab dans ton message.
Hyprland pour le contexte, et Gitlab car je n'ai ce message que quand je vais dans /.config/hypr obtenu par "git clone' et la personne qui a créée ce "Hyprland-rice" fait quelque chose pour que je puisse 'rice-update".
Re: [zsh] command not found: parse_git_dirty
Publié : lun. 17 mars 2025, 15:50
par Breizil29
C'est bon c'est RESOLU, j'ai supprimer le dossier ".git" dans ~/.config/hypr
Re: [zsh] command not found: parse_git_dirty- RESOLU
Publié : lun. 17 mars 2025, 16:09
par benjarobin
Non, ce n'est pas résolu ! Tu as juste contourné de manière très sale ton problème. Quand ta console sera dans un dossier géré par git, tu auras toujours le même souci.
Re: [zsh] command not found: parse_git_dirty- RESOLU
Publié : lun. 17 mars 2025, 17:19
par Breizil29
Moi je pense que si
Code : Tout sélectionner
gg@ArchLinux ~ cd .config/hypr/waybar
total 32K
drwxr-xr-x 3 gg gg 4.0K Mar 17 11:31 ./
drwxr-xr-x 18 gg gg 4.0K Mar 17 15:47 ../
-rw-rw-r-- 1 gg gg 6.3K Mar 17 11:02 config
drwxr-xr-x 2 gg gg 4.0K Mar 16 22:34 scripts/
-rwxrwxr-x 1 gg gg 135 Sep 8 2024 start*
-rw-rw-r-- 1 gg gg 7.7K Mar 17 11:31 style.css
gg@ArchLinux ~/.config/hypr/waybar
Re: [zsh] command not found: parse_git_dirty- RESOLU
Publié : lun. 17 mars 2025, 17:59
par benjarobin
Moi, non !!! Fait juste ceci (dans un dossier de ton choix) :
Re: [zsh] command not found: parse_git_dirty- RESOLU
Publié : lun. 17 mars 2025, 18:56
par Breizil29
OK
Code : Tout sélectionner
gg@ArchLinux ~ cd .config/hypr/waybar
total 36K
drwxr-xr-x 4 gg gg 4.0K Mar 17 18:52 ./
drwxr-xr-x 18 gg gg 4.0K Mar 17 15:47 ../
-rw-rw-r-- 1 gg gg 6.3K Mar 17 11:02 config
drwxr-xr-x 2 gg gg 4.0K Mar 16 22:34 scripts/
-rwxrwxr-x 1 gg gg 135 Sep 8 2024 start*
-rw-rw-r-- 1 gg gg 7.7K Mar 17 11:31 style.css
drwxr-xr-x 2 gg gg 4.0K Mar 17 18:52 test_git/
gg@ArchLinux ~/.config/hypr/waybar cd test_git
total 8.0K
drwxr-xr-x 2 gg gg 4.0K Mar 17 18:52 ./
drwxr-xr-x 4 gg gg 4.0K Mar 17 18:52 ../
gg@ArchLinux ~/.config/hypr/waybar/test_git git init
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /home/gg/.config/hypr/waybar/test_git/.git/
zsh: command not found: parse_git_dirty
gg@ArchLinux ~/.config/hypr/waybar/test_git master
Et...
Re: [zsh] command not found: parse_git_dirty- RESOLU
Publié : lun. 17 mars 2025, 19:43
par benjarobin
Tu as toujours ton problème (donc tu n'as rien résolu) :
Re: [zsh] command not found: parse_git_dirty- RESOLU
Publié : lun. 17 mars 2025, 20:08
par Breizil29
oui je suis d'accord
Code : Tout sélectionner
gg@ArchLinux ~ cd .config/zsh/themes
total 24K
drwxr-xr-x 2 gg gg 4.0K Mar 16 14:55 ./
drwxr-xr-x 5 gg gg 4.0K Mar 17 15:56 ../
-rw-r--r-- 1 gg gg 7.8K Sep 16 2023 agnoster.zsh-theme.zsh
-rw-r--r-- 1 gg gg 704 Sep 16 2023 funcky-zsh-theme.zsh
-rw-r--r-- 1 gg gg 603 Sep 16 2023 zsh-theme.zsh
gg@ArchLinux ~/.config/zsh/themes mkdir test_git
gg@ArchLinux ~/.config/zsh/themes cd test_git
total 8.0K
drwxr-xr-x 2 gg gg 4.0K Mar 17 19:58 ./
drwxr-xr-x 3 gg gg 4.0K Mar 17 19:58 ../
gg@ArchLinux ~/.config/zsh/themes/test_git git init
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /home/gg/.config/zsh/themes/test_git/.git/
zsh: command not found: parse_git_dirty
gg@ArchLinux ~/.config/zsh/themes/test_git master
mais qu'est ce que ça veut dire, le dossier ZSH ne vient pas de Gitlab et pourtant quand je rentre tes commandes ça fait la même chose. Je comprend rien.
Re: [zsh] command not found: parse_git_dirty- RESOLU
Publié : lun. 17 mars 2025, 20:16
par benjarobin
Mais je t'ai expliqué d'où venait le problème, cela n'a aucun lien avec tout ce que tu indiques. C'est en lien avec ta configuration de zsh qui est très certainement "cassée".
En gros il faut trouver le coupable, dans ta configuration de zsh :
Code : Tout sélectionner
grep -r parse_git_dirty /usr/share/zsh* /etc/zsh* /home/*/.*zsh* $ZDOTDIR/
Je ne sais pas où est défini
ZDOTDIR
dans cette usine à gaz comme l'indique papajoke ci-dessouss

Re: [zsh] command not found: parse_git_dirty
Publié : lun. 17 mars 2025, 20:17
par papajoke
Breizil29 a écrit : ↑lun. 17 mars 2025, 15:21
Voilà mon .zshrc :
Code : Tout sélectionner
source "$ZDOTDIR"/themes/agnoster.zsh-theme.zsh
#source "$ZDOTDIR"/themes/funcky-zsh-theme.zsh
piste:
agnoster est un theme oh-my-zsh et la fonction qui te manque est uniquement fournie avec oh-my-zsh
reste a savoir comment configurer cette usine à gaz ...
je ne maitrise pas du tout GIT
puisque tu ne connais pas git, alors aucune raison d'avoir ce plugin git actif pour le prompt (plugin utile uniquement pour les dev qui utilisent git)
Re: [zsh] command not found: parse_git_dirty- RESOLU
Publié : lun. 17 mars 2025, 21:53
par Breizil29
benjarobin je viens de faire :
dans un terminal de mon laptop qui est exempt de "git clone" a part celui pour installer "yay" et j'ai la même chose c.a.d tes commandes qui initialise un répertoire GIT vide, mais si je supprime ce répertoire tout rentre dans l'ordre.
Par contre sur mon laptop je n'ais pas eu "command not found: parse_git_dirty" car je n'utilise pas le prompt "Agnoster".