Skip to content

support using a list of str as one command to pass command and args #2467

@trim21

Description

@trim21

Description

there are some case I have a command with many arguments and flags to be executed, for example:

tasks:
  rclone:
    - |
      rclone copy '...' '...' \
      --progress \
      --order-by=size,asc \
      --exclude='1/**' \
      --exclude='2/**' \
      --checkers=2 \
      --transfers=1

it would be much easier to use a list as a single command to do this:

tasks:
  rclone:
    - 
      - rclone 
      - copy 
      - '...' 
      - '...'
      - --progress 
      - --order-by-size,asc
      - --exclude='1/**'
      - --exclude='2/**'
      - --checkers=2
      - --transfers=1

or:

tasks:
  rclone:
    - executable: rclone 
      args:
        - copy 
        - '...' 
        - '...'
        - --progress 
        - --order-by-size,asc
        - --exclude='1/**'
        - --exclude='2/**'
        - --checkers=2
        - --transfers=1

in this case we only render str with go template but not shell syntex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions