m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-19 17:13:42 -05:00

man pages with colors

schwert
2021-04-27 22:58:39 +02:00
parent 4649ce6335
commit 9eb5d323a1

@@ -1613,6 +1613,15 @@ function fman() {
} }
``` ```
Same as above, but the preview is colored with [bat](https://github.com/sharkdp/bat)
```sh
fman() {
man -k . | fzf -q "$1" --prompt='man> ' --preview $'echo {} | tr -d \'()\' | awk \'{printf "%s ", $2} {print $1}\' | xargs -r man | col -bx | bat -l man -p --color always' | tr -d '()' | awk '{printf "%s ", $2} {print $1}' | xargs -r man
}
# Get the colors in the opened man page itself
export MANPAGER="sh -c 'col -bx | bat -l man -p --paging always'"
```
### Python Behave BDD ### Python Behave BDD
<kbd>Tab</kbd> copy the step name. <kbd>Tab</kbd> copy the step name.