xaizek / hstr (License: Apachev2) (since 2018-12-07)
Bash and Zsh shell history suggest box - easily view, navigate, search and manage your command history.
Commit 3422670cb48605c1cf33429cede02c5078b6b38e

Fixed #37 - C-u changed to clear the pattern line.
Author: Martin Dvorak
Author date (UTC): 2014-01-18 21:08
Committer name: Martin Dvorak
Committer date (UTC): 2014-01-18 21:08
Parent(s): fec24970311deff098819b481601857fdc0ab343
Signing key:
Tree: 01f9673d07e166ded750894e6a441108281e9c80
File Lines added Lines deleted
man/hh.1 1 1
src/hstr.c 6 2
File man/hh.1 changed (mode: 100644) (index abe2862..419a448)
... ... Show configuration to be added to .bashrc
20 20 \fBpattern\fR \fBpattern\fR
21 21 Type to filter shell history. Type to filter shell history.
22 22 .TP .TP
23 \fBCtrl\-u\fR
23 \fBCtrl\-t\fR
24 24 Toggle case sensitive search. Toggle case sensitive search.
25 25 .TP .TP
26 26 \fBCtrl\-h\fR \fBCtrl\-h\fR
File src/hstr.c changed (mode: 100644) (index 1e036fe..36252b1)
... ... void print_cmd_deleted_label(char *cmd, int occurences)
112 112 // make this status row // make this status row
113 113 void print_history_label(HistoryItems *history) void print_history_label(HistoryItems *history)
114 114 { {
115 sprintf(screenLine, "- HISTORY - case:%s (C-u) - order:%s (C-h) - %d/%d ",
115 sprintf(screenLine, "- HISTORY - case:%s (C-t) - order:%s (C-h) - %d/%d ",
116 116 (caseSensitive?"sensitive":"insensitive"), (caseSensitive?"sensitive":"insensitive"),
117 117 (defaultOrder?"history":"ranking"), (defaultOrder?"history":"ranking"),
118 118 history->count, history->count,
 
... ... char *selection_loop(HistoryItems *history)
387 387 } }
388 388 print_history_label(history); print_history_label(history);
389 389 break; break;
390 case K_CTRL_U:
390 case K_CTRL_T:
391 391 caseSensitive=!caseSensitive; caseSensitive=!caseSensitive;
392 392 result = print_selection(maxHistoryItems, prefix, history); result = print_selection(maxHistoryItems, prefix, history);
393 393 print_history_label(history); print_history_label(history);
 
... ... char *selection_loop(HistoryItems *history)
405 405 print_history_label(history); print_history_label(history);
406 406 move(y, basex+strlen(prefix)); move(y, basex+strlen(prefix));
407 407 break; break;
408 case K_CTRL_U:
409 prefix[0]=0;
410 mvprintw(y, basex, "");
411 clrtoeol();
408 412 case KEY_BACKSPACE: case KEY_BACKSPACE:
409 413 if(strlen(prefix)>0) { if(strlen(prefix)>0) {
410 414 prefix[strlen(prefix)-1]=0; prefix[strlen(prefix)-1]=0;
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/hstr

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/hstr

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master