efs2 icon indicating copy to clipboard operation
efs2 copied to clipboard

Multiline string way of specifying PUT

Open paul-hammant opened this issue 4 years ago • 3 comments

Describe the idea

PUT command enhanced like so for new optional way:

PUT """ blah
        blah
        blah ...""" /etc/nginx/nginx.conf 0644

Additional context

In some cases items to be PUT on the target vm are short/clear and inlining them might boost the quick learning of the Es2file.

paul-hammant avatar Oct 30 '20 07:10 paul-hammant

At first, I read this as a multi-line for the RUN instruction which I've been meaning to work on for a while now. But as I read this I'm not sure I understand what you mean by multi-line for PUT? Are you talking about specifying multiple files to be placed into a directory? Something like

PUT file1 file2 file2 /some/dir/ 0644

But also supported like:

PUT file1
        file2
        file2 /some/dir/ 0644

Or are you describing putting the contents of the multi-line string into the destination file?

madflojo avatar Oct 30 '20 08:10 madflojo

My bad. It was about contents. Sure XML/JSON/YAML inside something that's from a different parser paradigm is icky of long, but this would be awesome for files that are only a few lines long.

paul-hammant avatar Oct 30 '20 08:10 paul-hammant

Got it, I like the idea. Makes total sense to me.

madflojo avatar Oct 30 '20 08:10 madflojo