Automatischer Push: AI/Regelwerk/windows-shell.md
- AI/Regelwerk/windows-shell.md Erzeugt vom PostToolUse-Hook .vault-tools/auto-push/auto_push.py. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
1 parent
b932a0cf17
commit
f2ccec39d6
1 file changed
+2
-2
@@ -5,7 +5,7 @@ status: pending-review
|
||||
summary: "Verbindliche Regeln für Befehle und Skripte auf Pascals Windows-Maschine: welche Shell, welches Python, Kodierung, Zeilenenden, Quoting-Schichten, WSL und ssh."
|
||||
tags: [regelwerk, windows, werkzeuge]
|
||||
created: 2026-09-13
|
||||
updated: 2026-10-14
|
||||
updated: 2026-10-29
|
||||
---
|
||||
|
||||
# Skripte und Shellbefehle unter Windows
|
||||
@@ -19,7 +19,7 @@ Die Fallgeschichten stehen im Harness-Gedächtnis. Der Name der Erinnerung steht
|
||||
- **Nie implizit `bash` aufrufen**, weder aus Python noch aus PowerShell. Windows sucht einen Programmnamen ohne Pfad zuerst in `System32`. Dort liegt der WSL-Starter, und seit dem 2026-09-03 startet er die Debian-Distribution statt der Git-Bash. Git-Bash sprichst du mit vollem Pfad an: `C:\Program Files\Git\bin\bash.exe`, nicht `…\usr\bin\`, weil der seine Coreutils nicht findet. WSL sprichst du mit `wsl -d <Distro>` an. `shutil.which("bash")` taugt nicht als Prüfung. (`bash-startet-unter-windows-den-wsl-stub`)
|
||||
- **`python`, nicht `python3`.** `python3` ist hier der Microsoft-Store-Stub.
|
||||
- **`PYTHONIOENCODING=utf-8`** vor jedem Python-Aufruf, der Umlaute oder Sonderzeichen ausgibt. Die Konsole fährt cp1252, und ohne die Variable bricht ein Skript mit `UnicodeEncodeError` ab oder zerlegt die Ausgabe.
|
||||
- ⚠ Mit `python -I` wirkt die Variable nicht: `-I` schließt `-E` ein und ignoriert alle `PYTHON*`-Variablen. Dann `python -I -X utf8`. (`python-isoliert-ignoriert-pythonioencoding`)
|
||||
- ⚠ Mit `python -I` wirkt die Variable nicht: `-I` schließt `-E` ein und ignoriert alle `PYTHON*`-Variablen. Dann `python -I -X utf8`. Das trifft auch `PYTHONDONTWRITEBYTECODE`: Soll kein `.pyc` im Projekt landen, zusätzlich `-B`. (`python-isoliert-ignoriert-pythonioencoding`)
|
||||
|
||||
## Skripte mit Prosa, Regex oder Backslashes
|
||||
|
||||
|
||||
Reference in new issue
Block a user