gdbus-tool: Make --dest optional for emit again
commit2a2717062b879e1f9b30230ffe8e59fa6d54181c
authorIain Lane <iain@orangesquash.org.uk>
Wed, 21 Feb 2018 12:22:08 +0000 (21 12:22 +0000)
committerPhilip Withnall <withnall@endlessm.com>
Wed, 21 Feb 2018 14:00:51 +0000 (21 14:00 +0000)
tree2fd8c28da51ac8a68bf127b098e79987a6f5db01
parent1717a8c9655c8e3ef35b66e4b3d6e3dcb0c5568d
gdbus-tool: Make --dest optional for emit again

Commit faf94409083f40ed096565b4f948852323bad697 made the bash completion more
robust, but in doing so it made the optional --dest argument to `gdbus emit'
mandatory by mistake.

Remove the error case when --dest is not specified. To keep the completion
working, we shuffle the cases around. --dest should be offered up for
completion after --session/--system/--address have been supplied, so we can
complete its argument. Additionally, if --dest isn't specified then we can't
complete --object-path or --signal, so guard these completions accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=793597
gio/gdbus-tool.c