cfgfoo

git clone https://orangeshoelaces.net/git/cfgfoo.git

953952416e865323514ccf444b1032613329ed4f

Author: Vasilii Kolobkov on 12/19/2018

Committer: Vasilii Kolobkov on 12/19/2018

Escape % in format string

Stats

steps/edit/overrideln | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/steps/edit/overrideln b/steps/edit/overrideln
index bd15883..31946a6 100644
--- a/steps/edit/overrideln
+++ b/steps/edit/overrideln
@@ -5,7 +5,7 @@ step_taken() {
 
 take_step() {
 	{
-		printf '%g /%s/ d\n' "$(echo "$2" | sed 's!/!\\/!g')"
+		printf '%%g /%s/ d\n' "$(echo "$2" | sed 's!/!\\/!g')"
 		printf '$a\n'
 		printf '%s\n.\n' "$3"
 		printf 'w\nq\n'