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 a36d4ff8aee11b41b56d1c796fe519403f95f0c1

Added hadler for SIGINT and fixed #29.
Author: Martin Dvorak
Author date (UTC): 2014-01-12 12:38
Committer name: Martin Dvorak
Committer date (UTC): 2014-01-12 12:38
Parent(s): ddc47ae0fc90544c912b549efb1b65933c9261df
Signing key:
Tree: 229de72ba8f652c0aeecb30ecfae0665a8ae5044
File Lines added Lines deleted
src/hstr.c 7 3
File src/hstr.c changed (mode: 100644) (index 0a9af5e..5d11a7b)
58 58 #endif #endif
59 59
60 60 static const char *INSTALL_STRING= static const char *INSTALL_STRING=
61 "\n# Add this configuration to ~/.bashrc to let HH load and flush up to date history"
61 62 "\nshopt -s histappend" "\nshopt -s histappend"
62 63 "\nexport PROMPT_COMMAND=\"history -a; history -n; ${PROMPT_COMMAND}\"" "\nexport PROMPT_COMMAND=\"history -a; history -n; ${PROMPT_COMMAND}\""
63 64 "\nbind '\"\\C-r\": \"\\C-k\\C-uhh\\C-j\"'" "\nbind '\"\\C-r\": \"\\C-k\\C-uhh\\C-j\"'"
 
... ... void hstr_on_exit(char *command) {
314 315
315 316 void signal_callback_handler_ctrl_c(int signum) void signal_callback_handler_ctrl_c(int signum)
316 317 { {
317 hstr_on_exit(NULL);
318 exit(signum);
318 if(signum==SIGINT) {
319 endwin();
320 hstr_on_exit(NULL);
321 exit(signum);
322 }
319 323 } }
320 324
321 325 char *selection_loop(HistoryItems *history) char *selection_loop(HistoryItems *history)
322 326 { {
323 //signal(SIGINT, signal_callback_handler_ctrl_c);
327 signal(SIGINT, signal_callback_handler_ctrl_c);
324 328
325 329 initscr(); initscr();
326 330 color_start(); color_start();
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