From 46be02ebebf027daba5aafa8efb19afaecce2ccf Mon Sep 17 00:00:00 2001 From: Hendrik Jaeger Date: Fri, 14 Sep 2018 23:23:08 +0200 Subject: Add experimental 'with' function --- .zsh_functions | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to '.zsh_functions') diff --git a/.zsh_functions b/.zsh_functions index feb0616..181d4ba 100644 --- a/.zsh_functions +++ b/.zsh_functions @@ -67,3 +67,12 @@ function henkspngpostproc () { pngnq -f -d resized/pngnqed -e .png resized/$img done } + +function with () { + local prefix="$* " str compcontext=normal:normal:_normal + while : + do + str=$prefix + vared str && eval $str + done +} -- cgit v1.2.3