version 1.16, 2004/07/20 03:50:25 |
version 1.17, 2004/09/16 04:39:16 |
|
|
{ |
{ |
static char word[FTPBUFLEN]; |
static char word[FTPBUFLEN]; |
static int lastc_argc, lastc_argo; |
static int lastc_argc, lastc_argo; |
|
|
struct cmd *c; |
struct cmd *c; |
const LineInfo *lf; |
const LineInfo *lf; |
int celems, dolist; |
int celems, dolist; |
size_t len; |
size_t len; |
|
|
|
ch = ch; /* not used */ |
lf = el_line(el); |
lf = el_line(el); |
len = lf->lastchar - lf->buffer; |
len = lf->lastchar - lf->buffer; |
if (len >= sizeof(line)) |
if (len >= sizeof(line)) |
|
|
return (CC_ERROR); |
return (CC_ERROR); |
|
|
switch (c->c_complete[cursor_argc - 1]) { |
switch (c->c_complete[cursor_argc - 1]) { |
case 'l': /* local complete */ |
case 'l': /* local complete */ |
case 'L': |
case 'L': |
return (complete_local(word, dolist)); |
return (complete_local(word, dolist)); |
case 'r': /* remote complete */ |
case 'r': /* remote complete */ |
case 'R': |
case 'R': |
if (connected != -1) { |
if (connected != -1) { |
fputs("\nMust be logged in to complete.\n", ttyout); |
fputs("\nMust be logged in to complete.\n", ttyout); |
return (CC_REDISPLAY); |
return (CC_REDISPLAY); |
} |
} |
return (complete_remote(word, dolist)); |
return (complete_remote(word, dolist)); |
case 'c': /* command complete */ |
case 'c': /* command complete */ |
case 'C': |
case 'C': |
return (complete_command(word, dolist)); |
return (complete_command(word, dolist)); |
case 'n': /* no complete */ |
case 'n': /* no complete */ |
default: |
return (CC_ERROR); |
return (CC_ERROR); |
|
} |
} |
|
|
return (CC_ERROR); |
return (CC_ERROR); |