int test_and_add(char *new_string, int new_index,
char **strings, int *hash_table, int hash_table_size) {
+
unsigned int code = 0;
// This is my recipe. I checked, it seems to work (as long as
// Remove the bash history prefix
- if(bash_history && (*t == ' ' || (*t >= '0' && *t <= '9'))) {
- while(*t == ' ' || (*t >= '0' && *t <= '9')) t++;
+ if(bash_history) {
+ while(*t == ' ') t++;
+ while(*t >= '0' && *t <= '9') t++;
+ while(*t == ' ') t++;
}
// Copy the string while transforming the ctrl characters into
}
else if(strcmp(argv[i], "-a") == 0) {
+ case_sensitive = 1;
+ i++;
}
else if(strcmp(argv[i], "-t") == 0) {
update_screen(¤t_line, &temporary_line, motion,
nb_lines, lines, cursor_position, pattern);
- } while(key != '\n' && key != KEY_ENTER && key != '\007'); // ^G
+ } while(key != '\007' && // ^G
+ key != '\033' && // ^[ (escape)
+ key != '\n' &&
+ key != KEY_ENTER);
echo();
endwin();