From 5dd1844b66908cb16f7b7e1a792a11b9780de183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 25 May 2021 01:20:35 +0200 Subject: 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. --- vpeval | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'vpeval') 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/^/# /' -- cgit v1.2.3