]> git.sesse.net Git - vlc/commitdiff
extras/zsh.cpp: allow completion of --option=value syntax
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Mon, 25 Apr 2005 22:27:41 +0000 (22:27 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Mon, 25 Apr 2005 22:27:41 +0000 (22:27 +0000)
extras/zsh.cpp

index a03b53d00ab63bb649a8b11a5c56b85f6ec6ec47..174727fa3a4005d8ab54a828d6490985004ed446 100644 (file)
@@ -344,8 +344,8 @@ void PrintOption( char *psz_option, char i_short, char *psz_exclusive,
     {
         if( !psz_exclusive ) psz_exclusive = "";
         else asprintf( &psz_exclusive, " %s", psz_exclusive );
-        printf( "  \"(-%c%s)--%s[%s]", i_short, psz_exclusive,
-                psz_option, psz_text );
+        printf( "  \"(-%c%s)--%s%s[%s]", i_short, psz_exclusive,
+                psz_option, psz_args?"=":"", psz_text );
         if( psz_args )
             printf( ":%s:%s\"\\\n", psz_longtext, psz_args );
         else
@@ -361,8 +361,8 @@ void PrintOption( char *psz_option, char i_short, char *psz_exclusive,
     else
     {
         if( psz_exclusive )
-            printf( "  \"(%s)--%s[%s]", psz_exclusive, psz_option,
-                    psz_text );
+            printf( "  \"(%s)--%s%s[%s]", psz_exclusive, psz_option,
+                    psz_args?"=":"", psz_text );
         else
             printf( "  \"--%s[%s]", psz_option, psz_text );