News for hackers. Stuff that matters.
Re:QEMU v4.0.0 released by jolmg on Wednesday April 24, 2019 @11:02AM (#19739029)
You're splitting the option value for -drive into multiple arguments. Here's an idea to fix that while keeping the same style:

  qemu-system-x86_64 \
      -display none \
      -m 2048 \
      -serial stdio \
      -drive "$(printf "%s"
          file=/export/cirros.qcow2, \
          format=qcow2, \
          if=virtio
      )"
Re:QEMU v4.0.0 released by yrro on Wednesday April 24, 2019 @06:53PM (#19743341)
If you don't mind using bash:

    args=(
     -display none
     -m 2048
     -serial stdio
    # -disabled-option
    )

    qemu-system-x86_64 "${args[@]}"
The array syntax means you can ditch the tedious backslashes and easily comment individual lines.
Re:QEMU v4.0.0 released by jolmg on Thursday April 25, 2019 @11:07AM (#19748930)
You're right about the ability to comment, but it doesn't save you from the tedious commas:

  drive_args=(
      file=/export/cirros.qcow2,
      format=qcow2,
      if=virtio
  )

  qemu_args=(
      -display none
      -m 2048
      -serial stdio
      -drive "$(printf "%s" "${drive_args[@]}")"
  )

  qemu-system-x86_64 "${qemu_args[@]}"
Personally, I prefer it with the backslashes if I don't need to comment.
Re:QEMU v4.0.0 released by kashyapc on Thursday April 25, 2019 @03:54AM (#19745957)
Ah, indeed. Thanks for the nice trick to avoid the tedium.