Commit d287e1a3 authored by sigmunau's avatar sigmunau
Browse files

extras/Makefile: A very very simple makefile to build the zsh stuff

extras/zsh.cpp: Support for completing simple url as well
parent a64ee2c3
zsh:zsh.cpp
g++ -I.. zsh.cpp ../lib/libvlc.a -o zsh `top_builddir=.. ../vlc-config vlc builtin --cflags --libs`
\ No newline at end of file
......@@ -61,8 +61,9 @@ int main( int i_argc, char **ppsz_argv )
p_vlc = vlc_current_object( i_ret );
printf("#compdef vlc\n\n"
"#This file is autogenerated by zsh.cpp\n"
"typeset -A opt_args\n"
"local context state line\n"
"local context state line ret=1\n"
"local modules\n\n" );
mods = PrintModuleList( p_vlc );
......@@ -82,11 +83,16 @@ int main( int i_argc, char **ppsz_argv )
printf( " \"--config[use alternate config file]\"\\\n" );
printf( " \"--reset-plugins-cache[resets the current plugins cache]\"\\\n" );
printf( " \"--version[print version information]\"\\\n" );
printf( " \"*:Playlist item:_files\"\\\n" );
printf( " && return 0\n\n" );
printf( " \"*:Playlist item:->mrl\" && ret=0\n\n" );
printf( "return 1\n" );
printf( "case $state in\n" );
printf( " mrl)\n" );
printf( " _alternative 'files:file:_files' 'urls:URL:_urls' && ret=0\n" );
printf( " ;;\n" );
printf( "esac\n\n" );
printf( "return ret\n" );
return 0;
/* Finish the threads */
VLC_CleanUp( 0 );
......@@ -163,8 +169,8 @@ mmap PrintModuleList( vlc_t *p_vlc )
{
modules_cap.insert( mpair( p_module->psz_capability,
p_module->psz_object_name ) );
if( p_module->b_submodule )
continue;
if( p_module->b_submodule )
continue;
printf( "%s ", p_module->psz_object_name );
}
......
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