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 7ec91392b04ec1f47338ed270f566380f2d0e89f

Fixing str() comparison defect.
Author: Martin Dvorak
Author date (UTC): 2014-01-25 16:22
Committer name: Martin Dvorak
Committer date (UTC): 2014-01-25 16:22
Parent(s): 19e68983fa69a9a8b52ac4b24d1d8be95c4bd985
Signing key:
Tree: b3f500f7fa0ce983922f8774b8bf869117e14852
File Lines added Lines deleted
src/hstr.c 0 3
src/hstr_utils.c 1 1
File src/hstr.c changed (mode: 100644) (index 9901049..ffee038)
... ... void highlight_selection(int selectionCursorPosition, int previousSelectionCurso
293 293 } }
294 294 } }
295 295
296
297 296 void selection_remove(char *cmd, HistoryItems *history) void selection_remove(char *cmd, HistoryItems *history)
298 297 { {
299 298 if(history->count) { if(history->count) {
 
... ... int main(int argc, char *argv[])
544 543 return EXIT_SUCCESS; return EXIT_SUCCESS;
545 544 } }
546 545 if(strstr(argv[1], "--help")) { if(strstr(argv[1], "--help")) {
547 // TODO --help (tr --help)
548 546 printf("%s", HELP_STRING); printf("%s", HELP_STRING);
549 547 return EXIT_SUCCESS; return EXIT_SUCCESS;
550 548 } }
 
... ... int main(int argc, char *argv[])
559 557
560 558 return EXIT_SUCCESS; return EXIT_SUCCESS;
561 559 } }
562
File src/hstr_utils.c changed (mode: 100644) (index c78e6d7..dccbfab)
... ... char *get_hostname()
67 67 } }
68 68
69 69 void toggle_case(char *str, bool lowercase) { void toggle_case(char *str, bool lowercase) {
70 if(str && strlen(str>0)) {
70 if(str && strlen(str)>0) {
71 71 int i; int i;
72 72 for(i = 0; str[i]; i++){ for(i = 0; str[i]; i++){
73 73 if(lowercase) { if(lowercase) {
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