dotfiles/scripts/fzf-search-manpage

4 lines
167 B
Bash
Executable file

#!/usr/bin/env sh
set -eu
# https://superuser.com/a/207474
apropos . | fzf --no-multi --tiebreak=begin --query="$*" | sed -n 's/^\([^ ]\+\) \?(\([^)]\+\)).*$/\2 \1/p'