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 10fca39f4a2139cebb7710fb62c077a485f5c5c9

Rewriting configure config to new notation + making source compilable w/o warnings.
Author: Martin Dvorak
Author date (UTC): 2015-02-24 20:47
Committer name: Martin Dvorak
Committer date (UTC): 2015-02-24 20:47
Parent(s): ba5a9c822f959f3fae5f2c914c81e852f8e8093c
Signing key:
Tree: ba44f97ca747f6c9c25a0ee40479e1713c8c95a3
File Lines added Lines deleted
configure.ac 11 10
src/hstr.c 1 1
File configure.ac changed (mode: 100644) (index 38eae09..d77b1e8)
1 # -*- Autoconf -*-
1 #
2 2 # Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
3 3 # #
4 4
 
... ... AC_PROG_CC
18 18
19 19 # Mac-specific ncurses check # Mac-specific ncurses check
20 20 AC_CANONICAL_HOST AC_CANONICAL_HOST
21 case $host_os in
22 darwin*)
23 AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])])
24 AC_CHECK_HEADER(curses.h)
25 ;;
26 *)
27 AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])])
21 AS_CASE([$host_os],
22 [darwin*],
23 [
24 AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])])
25 AC_CHECK_HEADER(curses.h)
26 ],
27 [
28 AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])])
28 29 AC_CHECK_HEADER(ncursesw/curses.h) AC_CHECK_HEADER(ncursesw/curses.h)
29 ;;
30 esac
30 ]
31 )
31 32
32 33 # Checks for libraries. # Checks for libraries.
33 34 AC_CHECK_LIB(m, cos, [], [AC_MSG_ERROR([Could not find m library])]) AC_CHECK_LIB(m, cos, [], [AC_MSG_ERROR([Could not find m library])])
File src/hstr.c changed (mode: 100644) (index 5670d76..4b970aa)
... ... int remove_from_history_model(char *delete, Hstr *hstr)
760 760 return favorites_remove(hstr->favorites, delete); return favorites_remove(hstr->favorites, delete);
761 761 } else { } else {
762 762 // raw & ranked history is pruned first as its items point to system history lines // raw & ranked history is pruned first as its items point to system history lines
763 int systemOccurences, rawOccurences=history_mgmt_remove_from_raw(delete, hstr->history);
763 int systemOccurences=0, rawOccurences=history_mgmt_remove_from_raw(delete, hstr->history);
764 764 history_mgmt_remove_from_ranked(delete, hstr->history); history_mgmt_remove_from_ranked(delete, hstr->history);
765 765 if(rawOccurences) { if(rawOccurences) {
766 766 systemOccurences=history_mgmt_remove_from_system_history(delete); systemOccurences=history_mgmt_remove_from_system_history(delete);
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