Use strstr instead of rstr.glob for now in @@ ##shell

* That doesnt changes the behaviour, but RStr.glob() is broken and fixing it will break this
This commit is contained in:
pancake 2022-04-01 21:10:49 +02:00 committed by GitHub
parent 605785b65d
commit 58b367610d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -360,7 +360,10 @@ struct duplicate_flag_t {
static bool duplicate_flag(RFlagItem *flag, void *u) {
struct duplicate_flag_t *user = (struct duplicate_flag_t *)u;
/* filter per flag spaces */
if (r_str_glob (flag->name, user->word)) {
bool valid = strchr (user->word, '*')
? r_str_glob (flag->name, user->word)
: strstr (flag->name, user->word) != NULL;
if (valid) {
RFlagItem *cloned_item = r_flag_item_clone (flag);
if (!cloned_item) {
return false;