mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-17 07:43:39 -05:00
Updated Examples (markdown)
20
Examples.md
20
Examples.md
@@ -2163,6 +2163,26 @@ fman() {
|
|||||||
# Get the colors in the opened man page itself
|
# Get the colors in the opened man page itself
|
||||||
export MANPAGER="sh -c 'col -bx | bat -l man -p --paging always'"
|
export MANPAGER="sh -c 'col -bx | bat -l man -p --paging always'"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Same as above, but for Termux (Android). man -k behaves differently in Android.
|
||||||
|
```sh
|
||||||
|
#!/data/data/com.termux/files/usr/bin/bash
|
||||||
|
export MANPAGER=~/bin/pman
|
||||||
|
man -k . | fzf --height=100% --preview-window=up -q "$1" --prompt='man> ' \
|
||||||
|
--preview $"echo {} | perl -p -e 's/[-\w, ]*, //; s/\((\d+).*/ \1/' \
|
||||||
|
| awk '{printf \"%s \", \$2} {print \$1}' \
|
||||||
|
| xargs -r man \
|
||||||
|
| col -bx | bat -l man -p --color always " \
|
||||||
|
| perl -p -e 's/[-\w, ]*, //; s/\((\d+).*/ \1/' \
|
||||||
|
| awk '{printf "%s ", $2} {print $1}' \
|
||||||
|
| xargs -n 2 -r man
|
||||||
|
```
|
||||||
|
Here is ~/bin/pman:
|
||||||
|
```sh
|
||||||
|
#!/data/data/com.termux/files/usr/bin/bash
|
||||||
|
cat $* | col -bx | bat -l man -p --paging always
|
||||||
|
```
|
||||||
|
|
||||||
#### fzf-man-pages widget (for zsh)
|
#### fzf-man-pages widget (for zsh)
|
||||||
Same functionality as above
|
Same functionality as above
|
||||||
- with colored and syntax higlighting
|
- with colored and syntax higlighting
|
||||||
|
|||||||
Reference in New Issue
Block a user