diff --git a/include/config.hpp b/include/config.hpp index b98c72e..8d0b9d8 100644 --- a/include/config.hpp +++ b/include/config.hpp @@ -139,7 +139,8 @@ inline const string AUTOCONFIG = R"#([general] # Please activate this before reporting bugs on our Github repo, thank you :) #debug = true -# Search AUR packages based on what (e.g "name-desc", "makedepends") +# Search AUR packages based on what +# Available options: "name", "name-desc", "depends", "makedepends", "optdepends", "checkdepends" #searchBy = "name-desc" # Where we are gonna download the AUR packages (default $XDG_CACHE_HOME/TabAUR, else ~/.cache/TabAUR) diff --git a/src/taur.cpp b/src/taur.cpp index 60d7798..b8b559f 100644 --- a/src/taur.cpp +++ b/src/taur.cpp @@ -567,7 +567,7 @@ vector TaurBackend::search_pac(string query) { vector TaurBackend::search(string query, bool useGit, bool checkExactMatch) { if (query.empty()) return vector(); - // link to AUR API + // link to AUR API. Took search pattern from yay cpr::Url url(("https://aur.archlinux.org/rpc?arg%5B%5D=" + cpr::util::urlEncode(query) + "&by=" + config.getConfigValue("searchBy", "name-desc") + "&type=search&v=5")); log_println(LOG_DEBUG, "url search = {}", url.str()); cpr::Response r = cpr::Get(url);