This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit 71f94f85b0ebe3056c78d91f5135cf06682a420c Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Dec 9 02:13:57 2018 +0100 x2goserver/lib/x2goupdateoptionsstring: update documentation to include the notion of the +key[=value] syntax, which makes sense to use if key starts with a dash and would be ambiguously interpreted as a removal. --- debian/changelog | 3 +++ x2goserver/lib/x2goupdateoptionsstring | 16 +++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8df7ab8..cdcb15d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,6 +35,9 @@ x2goserver (4.1.0.4-0x2go1) UNRELEASED; urgency=medium Perl::Critic in brutal mode. - x2goserver/lib/x2goupdateoptionsstring: add functionality for options removal. + - x2goserver/lib/x2goupdateoptionsstring: update documentation to include + the notion of the +key[=value] syntax, which makes sense to use if key + starts with a dash and would be ambiguously interpreted as a removal. * debian/control: + Build-depend upon lsb-release for distro version detection. * debian/x2goserver.manpages: diff --git a/x2goserver/lib/x2goupdateoptionsstring b/x2goserver/lib/x2goupdateoptionsstring index 4bbe0f5..c51fd73 100755 --- a/x2goserver/lib/x2goupdateoptionsstring +++ b/x2goserver/lib/x2goupdateoptionsstring @@ -477,7 +477,7 @@ x2goupdateoptionsstring - X2Go Agent Options String Manipulator =item B<x2goupdateoptionsstring> B<--man> -=item B<x2goupdateoptionsstring> I<options> [B<->]I<key>[B<=>I<value>] ... +=item B<x2goupdateoptionsstring> I<options> [B<->|B<+>]I<key>[B<=>I<value>] ... =back @@ -492,10 +492,12 @@ must be provided. It can either add, remove or replace components. -To add or replace a component, pass I<key>[B<=>I<value>] as a parameter. If the -options string does not include a B<key> key, it will be appended to the end of -the options string. If it already exists, either with no value or a different -value, the component will be replaced with the provided value. +To add or replace a component, pass I<key>[B<=>I<value>] or +B<+>I<key>[B<=>I<value>] as a parameter. The latter syntax is useful if I<key> +starts with a dash and would therefore be interpreted as a removal operation. +If the options string does not include a B<key> key, it will be appended to the +end of the options string. If it already exists, either with no value or a +different value, the component will be replaced with the provided value. To fully remove a component, pass B<->I<key>. To only remove it if it is set to a specific value, pass B<->I<key>B<=>I<value>. @@ -535,10 +537,10 @@ return nx/nx,clipboard=both,foo,bar:50 -and calling C<x2goupdateoptionsstring 'nx/nx,clipboard=both,foo:50' 'bar' +and calling C<x2goupdateoptionsstring 'nx/nx,clipboard=both,foo:50' '+-bar' 'foo=gulp' '-clipboard=client'> shall return - nx/nx,clipboard=both,foo=gulp,bar:50 + nx/nx,clipboard=both,foo=gulp,-bar:50 =head1 AUTHOR -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git