Use -o (--open-tty) to start the child with stdin as /dev/tty to allow
interactive mode. This is required by some commands like the new device
wipe command added with https://github.com/home-assistant/cli/pull/464.
Attempting to use the hardware command without a leading "ha" results in
the following error:
ha > hardware
Note: Leading 'ha' is not necessary in this HA CLI
Error: unknown command "rdware" for "ha"
Checking that the command starts with "ha " (note the space) will ensure
that the command string actually starts with a call to `ha`.
In the HA CLI the prompt already indicates that we are running in the HA
CLI (similar to virsh or other commands with built-in shell). However,
in regular shell the ha command needs to be used, so that is what most
documentation says. Note that 'ha' is not necessary and strip it from
the command.
Don't use read since it gets rid of quotes, which ultimately doesn't
allow arguments with spaces (such as --password "pw with spaces").
This requires xargs which then passes each word as an argument and
words in quotes as a single argument.
Fixes: #53