diff --git a/bin/toolbox b/bin/toolbox index 4e2534d..67007f2 100755 --- a/bin/toolbox +++ b/bin/toolbox @@ -11,7 +11,6 @@ import os import platform import shlex import json -import base64 from dataclasses import dataclass IS_MAC = platform.system() == "Darwin" @@ -859,21 +858,15 @@ def main() -> None: desc_col = f"{DIM}{t.description}{RST}{BADGE}" raw_preview = f"⚠ {get_install_cmd(t)}" - # Felder: display_name | display_desc | name_b64 | preview_b64 | idx:status | details_b64 - # Alle Preview-Felder als Base64: kein Leerzeichen → kein Word-Splitting durch fzf - name_b64 = base64.b64encode(t.name.encode()).decode() - 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}") + # Felder: display_name | display_desc | raw_name | raw_preview | idx:status | details + line = (f"{name_col}\t{desc_col}\t{t.name}\t{raw_preview}" + f"\t{i}:{'avail' if avail else 'missing'}\t{t.details}") tool_lines.append(line) - # Preview: alle Felder base64-kodiert → sicheres Dekodieren ohne Word-Splitting - # Normaler Python-String (kein r""), damit \" → " wird (echter Shell-Quoted-Context) + # Preview: Name (bold) + Details + Befehl/Install (gelb) preview = ( - "printf '\\n \\033[1m%s\\033[0m\\n\\n' \"$(printf '%s' {3} | base64 -d)\"; " - "printf '%s' {6} | base64 -d; " - "printf '\\n\\n \\033[33m%s\\033[0m\\n' \"$(printf '%s' {4} | base64 -d)\"" + r"printf '\n \033[1m%s\033[0m\n\n%s\n\n \033[33m%s\033[0m\n' " + r"'{3}' '{6}' '{4}'" ) key, chosen = fzf_run_keyed( diff --git a/zsh/.zshrc b/zsh/.zshrc index 1e49040..d3467a6 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -75,11 +75,7 @@ alias gp='git push' alias gl='git log --oneline --graph --decorate' alias gitcheck="~/git-check-all.sh --short" alias gitupdate="~/git-update-all.sh" -if [[ "$OSTYPE" == "darwin"* ]]; then - alias cb="pbpaste | sed 's/^ //' | pbcopy" -else - alias cb="xclip -selection clipboard -o | sed 's/^ //' | xclip -selection clipboard -i" -fi +alias cb="pbpaste | sed 's/^ //' | pbcopy" # Ubuntu-Kompatibilitaet: fd und bat heissen dort anders 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'