aboutsummaryrefslogtreecommitdiff
path: root/vpeval
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-05-25 01:20:35 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-05-25 01:20:35 +0200
commit5dd1844b66908cb16f7b7e1a792a11b9780de183 (patch)
tree3346540309985fc0369cb514dad6fad2bdec4673 /vpeval
parent4d759d9835082f8036d693421d786c1ac297f386 (diff)
downloadvp-5dd1844b66908cb16f7b7e1a792a11b9780de183.tar.gz
Preserve position after 'g' command
This unfortunately requires copying the command, which is visible for a short amount of time. But function should trump form here.
Diffstat (limited to 'vpeval')
-rwxr-xr-xvpeval4
1 files changed, 1 insertions, 3 deletions
diff --git a/vpeval b/vpeval
index d2226d4..4c5b785 100755
--- a/vpeval
+++ b/vpeval
@@ -1,4 +1,2 @@
#!/bin/sh
-c=`sed '/^#/d'`
-echo "$c"
-echo "$(eval "$c" 2>&1)" | sed 's/^/# /'
+echo "$(eval "$(sed '/^#/d')" 2>&1)" | sed 's/^/# /'