bash-completion icon indicating copy to clipboard operation
bash-completion copied to clipboard

chromium-browser: add more options

Open Lekensteyn opened this issue 7 years ago • 2 comments

Ubuntu and Debian have a shell script that parses a few options from the manual page. These options are quite limited though and is reflected in debian/README.debian:

Chromium has an extensive set of command-line flags that change rapidly, so
it's not really practical to include documentation in the package.  This page
is kept relatively up to date with that information:

http://peter.sh/experiments/chromium-command-line-switches

Arch Linux does not bother with a shell script and provides the binary where the --help output only mentions a single --password-store option. Try to be more helpful and extend the current suggested options (from the manual page) with (extension) developer-oriented options that are present in my private completion script.


Validated all options for existence using:

links=$(xsel)  # from X selection
curl https://peter.sh/experiments/chromium-command-line-switches/ > petersh.html
text=$(html2text --ignore-links petersh.html)
for i in ${links//=};do echo "$text" | grep -qe "$i" || echo "$i"; done

Lekensteyn avatar Oct 11 '18 16:10 Lekensteyn

I've split off the binary changes into #245 (and fixed Makefile.am and .gitignore, thanks for the suggestion). I've also elaborated the commit message of this change with the motivation for hardcoding these options, hopefully it is convincing :-)

Lekensteyn avatar Oct 13 '18 15:10 Lekensteyn

As mentioned in https://github.com/scop/bash-completion/pull/245#issuecomment-429606642, chromium-browser --help on Ubuntu (and similarly, chromium --help on Debian) have a couple of extra options that are specific to those systems:

    --verbose               Events logged to stderr.
    -g or --debug           Start within /usr/bin/gdb
    --temp-profile          Start with a new and temporary profile
    --no-touch-pinch        Disable pinch gestures.

--verbose is an alias for --enable-logging=stderr --v=1. --debug is effectively the same as gdb -q --args chromium "$@". --temp-profile is an alias for --user-data-dir=$(mktemp -d) --no-touch-pinch is an alias for --enable-pinch.

No new Ubuntu/Debian-specific options have been added in the past four years, so it is probably safe to say that no more options will be added any time soon: https://salsa.debian.org/chromium-team/chromium/commits/master/debian/scripts/chromium

If you think it is helpful to have completion for these, I could hardcode them under the condition that /etc/debian_version exists. Let me know what kind of changes you would like to see!

Lekensteyn avatar Oct 14 '18 09:10 Lekensteyn