[Bug 744877] tools: bash completion for gst-inspect and gst-launch

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun Mar 15 12:56:16 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=744877

David Röthlisberger <david at rothlis.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david at rothlis.net

--- Comment #21 from David Röthlisberger <david at rothlis.net> ---
I am the author of GStreamer's previous bash-completion implementation,
which I wrote 2 years ago. Today I decided to finish the job and have it
installed by "make install" (what can I say, my motivation ebbs and
flows) only to find that you beat me to it. :-)

So here's my belated review of this patch.

1. Can someone with commit access please delete the previous
   implementation:

    * tools/gstreamer-completion
    * tests/misc/test-gstreamer-completion.sh

2. The new implementation has the following regressions when completing
   gst-launch-1.0:

    * No completions offered for property values, for Enum and Boolean
      properties.
    * No completions offered for the arguments to "--gst-debug-level"
      and "--gst-plugin-path".
    * No trailing space is inserted after an unambiguous completion.

3. Regressions when completing gst-inspect-1.0:

    * No completions are offered for plugin names, only for element
      names (for example the previous implementation offered "udp",
      "udpsink" and "udpsrc", but the new implementation only offers
      the last 2).

4. I'd recommend namespacing all your bash functions with "_gst" because
   these get sourced into the user's shell and could in theory conflict
   with functions defined by other completion scripts or whatever.

5. $[...] is deprecated and "will be removed in upcoming versions of
bash".
   Use $((...)) instead.

Sorry if this sounded too negative. On the positive side, the fact that
this gets installed at all makes it 100x more useful than the previous
state of affairs. And maybe the new feature (where you only suggest
compatible elements) makes all the regressions worthwhile.

If you have any future patches I'll be happy to help with the review,
but please CC me as I don't monitor bugzilla.

Cheers,
Dave.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list