+ exe_n_cwd_tab_completion(matchBuf,
+ &num_matches, find_type);
+ /* Remove duplicate found */
+ if(matches) {
+ int i, j;
+ /* bubble */
+ for(i=0; i<(num_matches-1); i++)
+ for(j=i+1; j<num_matches; j++)
+ if(matches[i]!=0 && matches[j]!=0 &&
+ strcmp(matches[i], matches[j])==0) {
+ free(matches[j]);
+ matches[j]=0;
+ }
+ j=num_matches;
+ num_matches = 0;
+ for(i=0; i<j; i++)
+ if(matches[i]) {
+ if(!strcmp(matches[i], "./"))
+ matches[i][1]=0;
+ else if(!strcmp(matches[i], "../"))
+ matches[i][2]=0;
+ matches[num_matches++]=matches[i];
+ }
+ }