aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin_complete.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-02-15 12:22:28 +1000
committerGravatar axel <axel@liljencrantz.se>2006-02-15 12:22:28 +1000
commitc94b9e504d0db7ebd2a2b87fce997ca3c9851b8b (patch)
treedff930e4639b7141b7c0e334f096c07fb3e9b0d8 /builtin_complete.c
parent8be3bf3e5db8519ac69c3372342c97418c82e5ff (diff)
Remove the rather stupid -y option for complete, which loads another commands completions. Mostly the same results can be had with fewer bugs and corner cases vy using the new dynamically loaded functions.
darcs-hash:20060215022228-ac50b-85614ed684f73460d43543a579ff2c7e7914efeb.gz
Diffstat (limited to 'builtin_complete.c')
-rw-r--r--builtin_complete.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/builtin_complete.c b/builtin_complete.c
index b9947c1b..1e3ef7eb 100644
--- a/builtin_complete.c
+++ b/builtin_complete.c
@@ -253,7 +253,7 @@ int builtin_complete( wchar_t **argv )
string_buffer_t short_opt;
array_list_t gnu_opt, old_opt;
- wchar_t *comp=L"", *desc=L"", *condition=L"", *load=0;
+ wchar_t *comp=L"", *desc=L"", *condition=L"";
wchar_t *do_complete = 0;
@@ -334,10 +334,6 @@ int builtin_complete( wchar_t **argv )
}
,
{
- L"load", required_argument, 0, 'y'
- }
- ,
- {
L"do-complete", required_argument, 0, 'C'
}
,
@@ -351,7 +347,7 @@ int builtin_complete( wchar_t **argv )
int opt = wgetopt_long( argc,
argv,
- L"a:c:p:s:l:o:d:frxeun:y:C:",
+ L"a:c:p:s:l:o:d:frxeun:C:",
long_options,
&opt_index );
if( opt == -1 )
@@ -368,6 +364,7 @@ int builtin_complete( wchar_t **argv )
long_options[opt_index].name );
sb_append( sb_err,
parser_current_line() );
+
// builtin_print_help( argv[0], sb_err );
@@ -428,15 +425,13 @@ int builtin_complete( wchar_t **argv )
condition = woptarg;
break;
- case 'y':
- load = woptarg;
- break;
-
case 'C':
do_complete = woptarg?woptarg:reader_get_buffer();
break;
case '?':
+ sb_append( sb_err,
+ parser_current_line() );
// builtin_print_help( argv[0], sb_err );
res = 1;
@@ -494,10 +489,6 @@ int builtin_complete( wchar_t **argv )
res = 1;
}
- else if( load )
- {
- complete_load( load, 1 );
- }
else if( (al_get_count( &cmd) == 0 ) && (al_get_count( &path) == 0 ) )
{
/* No arguments specified, meaning we print the definitions of