inject the selected line into the tty input buffer
.IP "\fB-m\fP" 10
force the monochrome mode
+.IP "\fB-z\fP" 10
+remove the time prefix from zsh history
.IP "\fB-c <fg modeline> <bg modeline> <fg highlight> <bg highlight>\fP" 10
select the display colors for the modeline and the highlighted line
.IP "\fB-o <output filename>\fP" 10
char pattern_separator = ';';
int output_to_vt_buffer = 0;
int with_colors = 1;
+int zsh_history = 0;
//////////////////////////////////////////////////////////////////////
i++;
}
+ else if(strcmp(argv[i], "-z") == 0) {
+ zsh_history = 1;
+ i++;
+ }
+
else if(strcmp(argv[i], "-l") == 0) {
check_opt(argc, argv, i, 1, "<maximum number of lines>");
nb_lines_max = atoi(argv[i+1]);
<< " [-h]"
<< " [-v]"
<< " [-m]"
+ << " [-z]"
<< " [-c <fg modeline> <bg modeline> <fg highlight> <bg highlight>]"
<< " [-o <output filename>]"
<< " [-s <pattern separator>]"
int nb_lines = 0;
while(nb_lines < nb_lines_max && !file.eof()) {
file.getline(buffer, buffer_size);
- lines[nb_lines] = new char[strlen(buffer) + 1];
- strcpy(lines[nb_lines], buffer);
+ char *s = buffer;
+ if(zsh_history && *s == ':') {
+ s++;
+ while(*s && *s != ':') s++;
+ }
+ lines[nb_lines] = new char[strlen(s) + 1];
+ strcpy(lines[nb_lines], s);
nb_lines++;
}