Commit cba23b29 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

libvlc: --full-help now displays an exhaustive help.

-H has been defaulted to --full-help instead of --longhelp. This means that you don't have to type vlc -H --advanced --help-verbose, to get full VLC help. Additionaly, we now advertise a bit -H in -h or --help.
parent 9892f2d0
......@@ -2470,6 +2470,8 @@ vlc_module_begin();
#define HELP_TEXT \
N_("print help for VLC (can be combined with --advanced and " \
"--help-verbose)")
#define FULL_HELP_TEXT \
N_("Exhaustive help for VLC and its modules")
#define LONGHELP_TEXT \
N_("print help for VLC and all its modules (can be combined with " \
"--advanced and --help-verbose)")
......@@ -2499,10 +2501,13 @@ vlc_module_begin();
change_short( 'h' );
change_internal();
change_unsaveable();
add_bool( "longhelp", false, NULL, LONGHELP_TEXT, "", false );
add_bool( "full-help", false, NULL, FULL_HELP_TEXT, "", false );
change_short( 'H' );
change_internal();
change_unsaveable();
add_bool( "longhelp", false, NULL, LONGHELP_TEXT, "", false );
change_internal();
change_unsaveable();
add_bool( "help-verbose", false, NULL, HELP_VERBOSE_TEXT, "",
false );
change_internal();
......
......@@ -433,6 +433,15 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
b_exit = true;
i_ret = VLC_EEXITSUCCESS;
}
/* Check for full help option */
else if( config_GetInt( p_libvlc, "full-help" ) > 0 )
{
config_PutInt( p_libvlc, "advanced", 1);
config_PutInt( p_libvlc, "help-verbose", 1);
Help( p_libvlc, "full-help" );
b_exit = true;
i_ret = VLC_EEXITSUCCESS;
}
/* Check for long help option */
else if( config_GetInt( p_libvlc, "longhelp" ) > 0 )
{
......@@ -1274,8 +1283,15 @@ static void Help( libvlc_int_t *p_this, char const *psz_help_name )
utf8_fprintf( stdout, vlc_usage, p_this->psz_object_name );
Usage( p_this, "help" );
Usage( p_this, "main" );
utf8_fprintf( stdout, "To get a exhaustive help use -H\n" );
}
else if( psz_help_name && !strcmp( psz_help_name, "longhelp" ) )
{
utf8_fprintf( stdout, vlc_usage, p_this->psz_object_name );
Usage( p_this, NULL );
utf8_fprintf( stdout, "To get an exhaustive help use -H\n" );
}
else if( psz_help_name && !strcmp( psz_help_name, "full-help" ) )
{
utf8_fprintf( stdout, vlc_usage, p_this->psz_object_name );
Usage( p_this, NULL );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment