From c449c32c394cc71b50c1dd56cfc168991cd6f9d7 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Wed, 24 Nov 2021 18:21:24 -0500 Subject: [PATCH] Fix auto-insert of -- for mlr -s feature (forgotten on previous commit) --- internal/pkg/climain/mlrcli_shebang.go | 5 +++++ todo.txt | 1 + 2 files changed, 6 insertions(+) diff --git a/internal/pkg/climain/mlrcli_shebang.go b/internal/pkg/climain/mlrcli_shebang.go index 88782be157..2ccb562483 100644 --- a/internal/pkg/climain/mlrcli_shebang.go +++ b/internal/pkg/climain/mlrcli_shebang.go @@ -79,6 +79,11 @@ func maybeInterpolateDashS(args []string) []string { for _, argFromFile := range argsFromFile { newArgs = append(newArgs, argFromFile) } + + // So people can have verb-chains in their shebang file and flags like + // --icsv --ojson after + newArgs = append(newArgs, "--") + for _, remainingArg := range remainingArgs { newArgs = append(newArgs, remainingArg) } diff --git a/todo.txt b/todo.txt index 23d17904a1..ea1dde6c0d 100644 --- a/todo.txt +++ b/todo.txt @@ -9,6 +9,7 @@ PUNCHDOWN LIST - all-contribs: twi dm - license triple-checks - `mlr put` -> coverart + - #756 octal - 0b1011 olh/webdoc - rtd links somewhere