summaryrefslogtreecommitdiff
path: root/.zsh_functions
diff options
context:
space:
mode:
authorHendrik Jaeger <git-commit@henk.geekmail.org>2018-09-14 23:23:08 +0200
committerHendrik Jaeger <git-commit@henk.geekmail.org>2018-09-14 23:23:08 +0200
commit46be02ebebf027daba5aafa8efb19afaecce2ccf (patch)
tree1217fde15fdc3028252ec2f288d236451175cccd /.zsh_functions
parentb69dba2f6584554ea09b8a48033b3c683ff703df (diff)
Add experimental 'with' function
Diffstat (limited to '.zsh_functions')
-rw-r--r--.zsh_functions9
1 files changed, 9 insertions, 0 deletions
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
+}