Skip to content

Commit

Permalink
manfzf: fix superfluous "no manual entry" warning, refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
XPhyro committed Aug 22, 2024
1 parent 69f0f88 commit 27492a6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/sh/util/hotkey/manfzf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
. std.sh

apropos '' \
| fzf \
| head -n 1 \
| sed -E 's/^(.* )\((.*)\)(\s+-\s+.*)?$/\2 \1/' \
| xargs -d ' ' -rn 2 man
| fzf --no-multi \
| awk '{
cmd = $1
sec = substr($2, 2, length($2) - 2)
printf("%s", sec "\0" cmd "\0")
}' | xargs -r0 -n 2 man

0 comments on commit 27492a6

Please sign in to comment.