From 291cced60c468f09a5a17828f50ff8cd562e0e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Garc=C3=ADa?= Date: Sun, 15 Dec 2019 20:01:29 +0100 Subject: [PATCH] Updated Examples (markdown) --- Examples.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Examples.md b/Examples.md index b78fedd..27d05db 100644 --- a/Examples.md +++ b/Examples.md @@ -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 + +Tab copy the step name. +Enter 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 )' +} ``` \ No newline at end of file