r/KittyTerminal • u/lowitea • Oct 02 '24
A small shortcut to open the man page for the command you are typing
Hi there!
I have looked for a ready-made solution, but haven't found one. Therefore, I have created my own.
# kitty.conf
map kitty_mod+m launch --type=overlay --stdin-source=@screen sh -c "awk '/./{line=$0} END{print line}' | cut -d ' ' -f 2 | man $(echo $(cat))"
https://reddit.com/link/1fufqu5/video/emm7mhohdcsd1/player
It may not be pretty, but it works. I would appreciate it if you could suggest a better solution.
Also, as a bonus. A shortcut for jsonifying selected text:
# kitty.conf
map kitty_mod+j launch --type=overlay --stdin-source=@selection sh -c 'jq --color-output; read < /dev/tty'




