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 03d599030084ae3820a7d3421b82f413c9f93d98

Fixing memory leaks w/ valgrind.
Author: Martin Dvorak
Author date (UTC): 2017-04-12 07:23
Committer name: Martin Dvorak
Committer date (UTC): 2017-04-12 07:23
Parent(s): c09d19835ac3fa2c2fd93f8cfbd4e989357d4e5c
Signing key:
Tree: 4671685c1ebd215ca04b2c69d2f65fa8fa0a7e9a
File Lines added Lines deleted
src/hstr.c 11 4
src/hstr_blacklist.c 1 1
File src/hstr.c changed (mode: 100644) (index 9bfa827..ede9959)
... ... void hstr_getopt(int argc, char **argv, Hstr *hstr)
1413 1413 } }
1414 1414 } }
1415 1415
1416 void hstr_destroy()
1417 {
1418 favorites_destroy(hstr->favorites);
1419 hstr_regexp_destroy(&hstr->regexp);
1420 blacklist_destroy(&hstr->blacklist);
1421
1422 free(hstr);
1423 }
1424
1416 1425 int main(int argc, char *argv[]) int main(int argc, char *argv[])
1417 1426 { {
1418 1427 setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
1419 1428
1420 1429 hstr=malloc(sizeof(Hstr)); hstr=malloc(sizeof(Hstr));
1421
1422 1430 hstr_init(); hstr_init();
1423 1431 hstr_get_env_configuration(hstr); hstr_get_env_configuration(hstr);
1424 1432 hstr_getopt(argc, argv, hstr); hstr_getopt(argc, argv, hstr);
1425 1433 hstr_init_favorites(hstr); hstr_init_favorites(hstr);
1426 1434 blacklist_load(&hstr->blacklist); blacklist_load(&hstr->blacklist);
1427 hstr_main(hstr);
1428 1435
1429 favorites_destroy(hstr->favorites);
1430 free(hstr);
1436 hstr_main(hstr);
1431 1437
1438 hstr_destroy();
1432 1439 return EXIT_SUCCESS; return EXIT_SUCCESS;
1433 1440 } }
File src/hstr_blacklist.c changed (mode: 100644) (index 1f7f751..f8b6e66)
1 1 /* /*
2 2 hstr_blacklist.c commands to be skipped from history hstr_blacklist.c commands to be skipped from history
3 3
4 Copyright (C) 2014 Martin Dvorak <martin.dvorak@mindforger.com>
4 Copyright (C) 2014-2017 Martin Dvorak <martin.dvorak@mindforger.com>
5 5
6 6 Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
7 7 you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
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