[PATCH 2/2] Add '-l / --last-arg' to herbstclient

Thorsten Wißmann edu at thorsten-wissmann.de
Mon Jun 30 11:55:46 CEST 2014


Hi,

On Wed, Jun 25, 2014 at 01:09:44PM +0200, Florian Schmaus wrote:
>          if (print_signal) {
> -            // just print as list
> -            for (int i = 0; i < hook_argc; i++) {
> -                printf("%s%s", i ? "\t" : "", hook_argv[i]);
> +            if (g_print_last_arg_only) {
> +                // This assumes that hook_argc is always > 0!
> +                printf("%s", hook_argv[hook_argc-1]);
> +            } else {

Don't assume it, check it :). I've just added a check for it such that
"empty" hooks are simply dropped.

BTW I totally forgot to tell in the last mail that I merged your
previous commit as well as this one:

24bc774 Add '-l / --last-arg' to herbstclient
2ca6ab9 Add '-0 / --print0' to herbstclient

Thanks &
Cheers,
Thorsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 213 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/hlwm/attachments/20140630/9a8d7195/attachment.sig>


More information about the hlwm mailing list