Compare commits

..

No commits in common. "b8337f2762cf93edf755b1feb85aa83a7bbdeffc" and "2f731f68e21a0279f13457fa0c96a9f2014ed918" have entirely different histories.

2 changed files with 7 additions and 18 deletions

View file

@ -11,7 +11,6 @@ import os
import platform import platform
import shlex import shlex
import json import json
import base64
from dataclasses import dataclass from dataclasses import dataclass
IS_MAC = platform.system() == "Darwin" IS_MAC = platform.system() == "Darwin"
@ -859,21 +858,15 @@ def main() -> None:
desc_col = f"{DIM}{t.description}{RST}{BADGE}" desc_col = f"{DIM}{t.description}{RST}{BADGE}"
raw_preview = f"⚠ {get_install_cmd(t)}" raw_preview = f"⚠ {get_install_cmd(t)}"
# Felder: display_name | display_desc | name_b64 | preview_b64 | idx:status | details_b64 # Felder: display_name | display_desc | raw_name | raw_preview | idx:status | details
# Alle Preview-Felder als Base64: kein Leerzeichen → kein Word-Splitting durch fzf line = (f"{name_col}\t{desc_col}\t{t.name}\t{raw_preview}"
name_b64 = base64.b64encode(t.name.encode()).decode() f"\t{i}:{'avail' if avail else 'missing'}\t{t.details}")
preview_b64 = base64.b64encode(raw_preview.encode()).decode()
details_b64 = base64.b64encode(t.details.encode()).decode()
line = (f"{name_col}\t{desc_col}\t{name_b64}\t{preview_b64}"
f"\t{i}:{'avail' if avail else 'missing'}\t{details_b64}")
tool_lines.append(line) tool_lines.append(line)
# Preview: alle Felder base64-kodiert → sicheres Dekodieren ohne Word-Splitting # Preview: Name (bold) + Details + Befehl/Install (gelb)
# Normaler Python-String (kein r""), damit \" → " wird (echter Shell-Quoted-Context)
preview = ( preview = (
"printf '\\n \\033[1m%s\\033[0m\\n\\n' \"$(printf '%s' {3} | base64 -d)\"; " r"printf '\n \033[1m%s\033[0m\n\n%s\n\n \033[33m%s\033[0m\n' "
"printf '%s' {6} | base64 -d; " r"'{3}' '{6}' '{4}'"
"printf '\\n\\n \\033[33m%s\\033[0m\\n' \"$(printf '%s' {4} | base64 -d)\""
) )
key, chosen = fzf_run_keyed( key, chosen = fzf_run_keyed(

View file

@ -75,11 +75,7 @@ alias gp='git push'
alias gl='git log --oneline --graph --decorate' alias gl='git log --oneline --graph --decorate'
alias gitcheck="~/git-check-all.sh --short" alias gitcheck="~/git-check-all.sh --short"
alias gitupdate="~/git-update-all.sh" alias gitupdate="~/git-update-all.sh"
if [[ "$OSTYPE" == "darwin"* ]]; then alias cb="pbpaste | sed 's/^ //' | pbcopy"
alias cb="pbpaste | sed 's/^ //' | pbcopy"
else
alias cb="xclip -selection clipboard -o | sed 's/^ //' | xclip -selection clipboard -i"
fi
# Ubuntu-Kompatibilitaet: fd und bat heissen dort anders # Ubuntu-Kompatibilitaet: fd und bat heissen dort anders
command -v fdfind &>/dev/null && ! command -v fd &>/dev/null && alias fd='fdfind' command -v fdfind &>/dev/null && ! command -v fd &>/dev/null && alias fd='fdfind'
command -v batcat &>/dev/null && ! command -v bat &>/dev/null && alias bat='batcat' command -v batcat &>/dev/null && ! command -v bat &>/dev/null && alias bat='batcat'