From ecb3443029c87ba8dc6a1c696d74dd5b74916f75 Mon Sep 17 00:00:00 2001 From: MahouShoujoMivutilde <14999778+MahouShoujoMivutilde@users.noreply.github.com> Date: Thu, 15 Oct 2020 15:01:10 +0300 Subject: [PATCH] Updated Examples (markdown) --- Examples.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Examples.md b/Examples.md index 7296cb1..b4f9d07 100644 --- a/Examples.md +++ b/Examples.md @@ -1480,6 +1480,8 @@ So you'll need: #!/usr/bin/env bash # fzfmenu - fzf as dmenu replacement +# fifos are here to not wait for end of input +# (useful for e.g. find $HOME | fzfmenu ...) input=$(mktemp -u --suffix .fzfmenu.input) output=$(mktemp -u --suffix .fzfmenu.output) mkfifo $input @@ -1488,10 +1490,10 @@ chmod 600 $input $output # it's better to use st here (starts a lot faster than pretty much everything else) # the ugly printf | sed thing is here to make args with quotes work. -# (e.g. --preview='echo {1}') +# (e.g. --preview='echo {1}'). # sadly we can't use "$@" here directly because we are inside sh -c "..." call -# already - +# already. +# you can also set window dimensions via -g '=ROWxCOLS', see man st. st -c fzfmenu -n fzfmenu -e sh -c "cat $input | fzf $(printf -- " '%s'" "$@" | sed "s/^ ''$//") | tee $output" & disown # handle ctrl+c outside child terminal window