I've noticed an issue with how vs-shell-format handles the indentation of command arguments. Currently, arguments are indented at the same level as their parent command, which reduces the overall readability and clarity of the script. This formatting style makes it challenging to distinguish between the primary command and its subsequent arguments or sub-commands, especially in complex scripts.
For example, currently formatted code looks like this:
foo | \
bar | \
sed \
-e '<something>' \
-e '<something else>'
I propose adjusting the formatter to indent arguments at a different level from their parent command, like so:
foo | \
bar | \
sed \
-e '<something>' \
-e '<something else>'
This change would align with common scripting conventions, enhance readability, and make maintenance and debugging more straightforward. It would also provide a clear visual hierarchy in the script, making it easier to parse and understand at a glance.
I've noticed an issue with how vs-shell-format handles the indentation of command arguments. Currently, arguments are indented at the same level as their parent command, which reduces the overall readability and clarity of the script. This formatting style makes it challenging to distinguish between the primary command and its subsequent arguments or sub-commands, especially in complex scripts.
For example, currently formatted code looks like this:
I propose adjusting the formatter to indent arguments at a different level from their parent command, like so:
This change would align with common scripting conventions, enhance readability, and make maintenance and debugging more straightforward. It would also provide a clear visual hierarchy in the script, making it easier to parse and understand at a glance.