Skip to content

Instantly share code, notes, and snippets.

@larsch
Created June 6, 2024 20:47
Show Gist options
  • Save larsch/5c776439a3a727596005ca7dad987b1d to your computer and use it in GitHub Desktop.
Save larsch/5c776439a3a727596005ca7dad987b1d to your computer and use it in GitHub Desktop.
#!/bin/sh
pagetitle=$(man -k . | fzf)
if [[ -n "$pagetitle" ]]; then
echo "$pagetitle" | while read -r name num _; do
num=${num%)}
num=${num#(}
echo -ne "\033]0;man $num $name\007"
exec /usr/bin/man "$num" "$name"
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment