search for: complete_display

Displaying 1 result from an estimated 1 matches for "complete_display".

2007 Dec 12
0
Revisiting sftp tab completion patch
...E }, + { "version", I_VERSION, NOARGS }, + { "!", I_SHELL, NOARGS }, + { "?", I_HELP, NOARGS }, + { NULL, -1, -1} }; int interactive_loop(int fd_in, int fd_out, char *file1, char *file2); @@ -1344,13 +1357,237 @@ return ("sftp> "); } +void +complete_display(char **list, u_int len) +{ + u_int y, m = 0, width = 80, columns = 1, colspace = 0; + struct winsize ws; + + /* Count entries for sort and find longest filename */ + for (y = 0; list[y]; y++) + m = MAX(m, strlen(list[y])); + + if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1) + width = ws.ws_...