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 d99983de08d3408506d1ff262409ca0a1c3a477d

Fixing bug #186 and thus finishing Win10 support + fixing fprint() compilation warnings.
Author: Martin Dvorak
Author date (UTC): 2017-06-05 04:38
Committer name: Martin Dvorak
Committer date (UTC): 2017-06-05 04:38
Parent(s): 533d6c29064f5bc6ddac617dfecad256f8f31e3b
Signing key:
Tree: 4e0221af5345f1df3ff5e8433d4d5f96da2df22d
File Lines added Lines deleted
src/hstr.c 11 1
src/hstr_utils.c 2 2
File src/hstr.c changed (mode: 100644) (index 9706963..b6c149d)
... ... static const char *INSTALL_BASH_STRING=
178 178 "\nexport HISTSIZE=${HISTFILESIZE} # increase history size (default is 500)" "\nexport HISTSIZE=${HISTFILESIZE} # increase history size (default is 500)"
179 179 "\nexport PROMPT_COMMAND=\"history -a; history -n; ${PROMPT_COMMAND}\" # mem/file sync" "\nexport PROMPT_COMMAND=\"history -a; history -n; ${PROMPT_COMMAND}\" # mem/file sync"
180 180 "\n# if this is interactive shell, then bind hh to Ctrl-r (for Vi mode check doc)" "\n# if this is interactive shell, then bind hh to Ctrl-r (for Vi mode check doc)"
181 #if defined(__MS_WSL__) || defined(__CYGWIN__)
181 // IMPROVE hh (win10) vs. hstr (cygwin) binary on various platforms must be resolved
182 #if defined(__MS_WSL__)
183 // IMPROVE commands are NOT executed on return under win10 > consider hstr_utils changes
184 "\nfunction hstr_winwls {"
185 "\n offset=${READLINE_POINT}"
186 "\n READLINE_POINT=0"
187 "\n { READLINE_LINE=$(</dev/tty hh ${READLINE_LINE:0:offset} 2>&1 1>&$hstrout); } {hstrout}>&1"
188 "\n READLINE_POINT=${#READLINE_LINE}"
189 "\n}"
190 "\nif [[ $- =~ .*i.* ]]; then bind -x '\"\\C-r\": \"hstr_winwls\"'; fi"
191 #elif defined(__CYGWIN__)
182 192 "\nfunction hstr_cygwin {" "\nfunction hstr_cygwin {"
183 193 "\n offset=${READLINE_POINT}" "\n offset=${READLINE_POINT}"
184 194 "\n READLINE_POINT=0" "\n READLINE_POINT=0"
File src/hstr_utils.c changed (mode: 100644) (index 5d31597..bd1e1cc)
... ... void fill_terminal_input(char *cmd, bool padding)
88 88 { {
89 89 if(cmd && strlen(cmd)>0) { if(cmd && strlen(cmd)>0) {
90 90 #if defined(__MS_WSL__) || defined(__CYGWIN__) #if defined(__MS_WSL__) || defined(__CYGWIN__)
91 fprintf(stderr,cmd);
92 if(padding) fprintf(stderr,"\n");
91 fprintf(stderr, "%s", cmd);
92 if(padding) fprintf(stderr, "%s", "\n");
93 93 #else #else
94 94 size_t size = strlen(cmd); size_t size = strlen(cmd);
95 95 unsigned i; unsigned i;
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