m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 16:45:38 -05:00

Updated Examples (markdown)

Enrique García
2019-12-15 20:01:29 +01:00
parent e5545dfd86
commit 291cced60c

@@ -52,7 +52,7 @@ Table of Contents
* [buku](#buku)
* [i3](#i3)
* [man pages](#man-pages)
* [Python Behave BDD](#python-behave-bdd)
@@ -1366,4 +1366,18 @@ man-find() {
fman() {
man -k . | fzf --prompt='Man> ' | awk '{print $1}' | xargs -r man
}
```
### Python Behave BDD
<kbd>Tab</kbd> copy the step name.
<kbd>Enter</kbd> copy the step location
```sh
fbehave() {
behave "$@" -d -f steps 2> /dev/null | \
awk -F " *# " '/\s*(Given|When|Then|\*)/ {print $1"\t"$2}' | \
fzf -d "\t" --with-nth=1 \
--bind 'enter:execute(echo {} | cut -f2 | pbcopy )' \
--bind 'tab:execute(echo {} | cut -f1 | awk "{\$1=\$1};1" | pbcopy )'
}
```