Open korpiq opened 5 years ago
I try to compile it on macOS To make it compile (not work)
#ifdef _GNU_SOURCE
char * c = get_current_dir_name();
#else
char * c = (char *) malloc(PATH_MAX * sizeof(char));
getcwd(c, PATH_MAX);
#endif
Thanks Eric Marchand I made those 3 changes and it compiles & works for me on MacOS Ventura. osx-ventura.patch
Then I added to my ~/.zshrc
source /usr/local/etc/advanced-shell-history/config
export ASH_CFG_SYSTEM_QUERY_FILE
source /usr/local/lib/advanced_shell_history/sh/zsh
I also had to copy /usr/local/etc/advanced-shell-history/queries to ~/.ash/queries
[ ~/source/advanced-shell-history| main !3 ]
> ash_query -q RCWD |grep build_c |tail -2
2023-01-19 17:39:02 ash_query -q RCWD |grep build_c
2023-01-19 17:39:25 history|grep build_c
[ ~/source/advanced-shell-history| main !3 ]
> history |grep build_c |tail -2
11039 2023-01-19 17:39 history|grep build_c
11047 2023-01-19 17:46 ash_query -q RCWD |grep build_c |tail -2
I'll take the patch and test it out. FWIW - PR's are always welcome, but if it works I'll merge it myself. Thanks @alanmiller!
Build fails with
database.cpp:221:16: error: use of undeclared identifier 'clock_nanosleep'
.make build_c
:g++ --version
: