Titel: qman das moderne man
Beitrag von: Sebastian am 05. Juni 2025, 14:45:25
https://github.com/plp13/qman
Ihr dürft mir später danken ;)
Edit:
Eine nützlicher Shortcut ist t (table of Content)
LG Sebastian |
Titel: Re:qman das moderne man
Beitrag von: Andreas am 05. Juni 2025, 15:33:55
geiles Paket - danke! ;D ;D ;D
LG Andreas |
Titel: Re:qman das moderne man
Beitrag von: Dietrich am 05. Juni 2025, 18:03:37
Ja, schönes Paket Danke Sebastian (oder ist das zu früh?) ;D
Mal den Lernmodus einschalten |
Titel: qman completion
Beitrag von: Sebastian am 07. Juni 2025, 13:38:02
Da mir für qman ein autocomplete fehlte, habe ich mir ein kleines autocomplete Skript für qman geschrieben. Vielleicht könnt ihr es auch gebrauchen.
Wohin das Skript am besten abgelegt wird, entnimmt bitte der bash-complition Dokumentation (https://github.com/scop/bash-completion#faq#Q.%20Where%20should%20I%20install%20my%20own%20local%20completions?:~:text=Q.%20Where%20should%20I%20install%20my%20own%20local%20completions%3F)
Ihr dütft auch gerne Verbesserungen einbringen. ;)
Code:
if type -P qman >/dev/null; then _qman() { local CWORD CWORD="${COMP_WORDS[COMP_CWORD]}" _get_qman_option() { local -a option local -r option_regex='\B-\w\b|--[\w-]+' mapfile -t option < <(qman --help | grep -oP -- "${option_regex}") mapfile -t COMPREPLY < <(compgen -W "${option}" -- "${CWORD}") } _get_manual() { local -a manual mapfile -t manual < <(man -k . | cut -d ' ' -f1 | uniq) mapfile -t COMPREPLY < <(compgen -W "${manual}" -- "${CWORD}") } case "${CWORD}" in -*) _get_qman_option ;; *) _get_manual ;; esac } complete -F _qman qman fi
|
|
LG Sebastian |
Diskussions- und Newsboard der Linux Interessen Gruppe Suletuxe | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
|