]> git.sesse.net Git - vlc/commitdiff
libvlc: --full-help now displays an exhaustive help.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 6 Jul 2008 19:55:18 +0000 (21:55 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 6 Jul 2008 19:55:43 +0000 (21:55 +0200)
-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.

src/libvlc-module.c
src/libvlc.c

index 000b6935539285b26854495b6b4be9b0e1f4113e..c7b106b2a904e34fd0d451c4fe983de1b4e5bd13 100644 (file)
@@ -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();
index 276e1205e8b5e1f7e44075e7b1c4b1565c0e38c6..9acd6da08d88b3a70a82422732686a410a242d73 100644 (file)
@@ -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 );