#122 -hold documentation/impl in 0.5.3 tarball


The documentation for -hold in the man page doesn't match the implementation, and the implementation has an ominous comment.

-hold is documented as a boolean on the man page, but in src/xdefaults.c it's declared as a STRG. The code in src/init.c which refers to it recognizes "yes", "true", or "on" (case-insensitive) as possible values (see line 1455ff.), but the comment says "Backward compatibility hack". So I can't tell if your intention is to implement it as a BOOL or as a STRG.

In any case, "-hold yes" works on the command line; "-hold" does not, and furthermore does not complain about a missing argument.


  • Jehan

    Jehan - 2008-08-08

    Logged In: YES
    Originator: NO


    as far as I can see it, it is fixed by now. At least the man seems rather understandable:

    -hold mask
    Hold the tab open after the child process in it exits. mask is the mask of flags which control weather
    the tab will be held open based on the exit status of the child process. If the lowest bit (0x01) of
    mask is set, then the tab will always be held open after the child exits. If the next bit (0x02) is
    set, then the tab will only be held open if the child exits abnormally (e.g. via abort(1)). If the
    third bit (0x04) is set, then the tab will be held open if the child exits with non‐zero status.

    NOTE: In previous versions of mrxvt this was a boolean option. For backward compatibility, the value of
    True, On, Yes will be treated as 1 and anything illegal will be treated as 0. The default is 0x06.

    But there is indeed the old man on the website which seems obsolete.

    As far as I could test the option itself, it looks working with integers, as explained in recent man... The only point which still looks strange is when you set just "-hold" without parameter. I tried -hold and +hold, it does not complain, but nothing special happens when I exit. I guess for backward compatibility this may be processed in some way? Or at least complain that this is not good syntax.

    As far as I can see, options are parsed in rxvt_get_options, in xdefaults.c:887, after the execution (-exec) option and the associated command being removed in rxvt_init_resources, from init.c:991. Maybe someday a look could be done on this? This can probably be improved, or at least refreshed (removing old obsolete behaviour maybe?).

  • Jehan

    Jehan - 2008-08-08
    • priority: 5 --> 4

Log in to post a comment.