vs-shell-format icon indicating copy to clipboard operation
vs-shell-format copied to clipboard

issue when formatting the truncate command "> poo.foo"

Open DNACore opened this issue 4 years ago • 4 comments

the script input

> somefile.log

Expected

> somefile.log

but it is

>somefile.log

and it's a wrong command.

DNACore avatar Jul 21 '20 02:07 DNACore

Noticed the same cheeky formatting behaviour here as well. Is there any setting in VSCode we can do to affect this behaviour? Style preferences of sorts?

LeoK80 avatar Aug 26 '20 08:08 LeoK80

in VS Code you can set option "shellformat.flag": "keep_padding" in the settings.json which fixes it for me. Not fully tested what other side-effect this might have in terms of keeping padding on things that I probably would like to see truncated.

LeoK80 avatar Aug 26 '20 10:08 LeoK80

in VS Code you can set option "shellformat.flag": "keep_padding" in the settings.json which fixes it for me. Not fully tested what other side-effect this might have in terms of keeping padding on things that I probably would like to see truncated.

@LeoK80

I set the option "shellformat.flag": "keep_padding" and found that it can't format the code at all

DNACore avatar Sep 01 '20 12:09 DNACore

This also breaks things such as

${date +%s}

by turning it into

${date+%s}

Setting "keep_padding" seems to stop this, but also seems to stop pretty much everything else that's useful...

Makeshift avatar Nov 13 '20 02:11 Makeshift