return exit code 2 if search term not found

This commit is contained in:
alcah
2020-03-17 21:51:40 +10:30
parent a500176661
commit 021e467b37
3 changed files with 19 additions and 9 deletions

View File

@@ -23,6 +23,13 @@ struct TSearchResult {
typedef std::vector<TSearchResult> TSearchResultList;
//possible return values for Library.process_phase()
enum search_result {
SEARCH_SUCCESS = 0,
SEARCH_FAILURE,
SEARCH_NO_RESULT
};
//this class is wrapper around Dicts class for easy use
//of it
class Library : public Libs
@@ -38,7 +45,7 @@ public:
setFuzzy(!no_fuzzy);
}
bool process_phrase(const char *loc_str, IReadLine &io, bool force = false);
search_result process_phrase(const char *loc_str, IReadLine &io, bool force = false);
private:
bool utf8_input_;