From 57e5a5b5791cec9e486c8859c254fc348815ce6a Mon Sep 17 00:00:00 2001 From: ketmar Date: Wed, 2 Oct 2013 12:02:23 +0300 Subject: [PATCH] removed ':P' selector; use ':GRD' instead --- src/expand.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/expand.c b/src/expand.c index 681cfb0..f196f2e 100644 --- a/src/expand.c +++ b/src/expand.c @@ -476,9 +476,9 @@ static void process_selectors (dstring_t *res, const char *s, const char *e, LOL } continue; } - if (strchr("GRDBSMP", mc) == NULL) { printf("FATAL: invalid selector: '%c'\n", mc); exit(42); } + if (strchr("GRDBSM", mc) == NULL) { printf("FATAL: invalid selector: '%c'\n", mc); exit(42); } /* parse value if it is necessary */ - if (!pnp_inited && strchr("GRDBSMP", mc) != NULL) { + if (!pnp_inited && strchr("GRDBSM", mc) != NULL) { pnp_inited = 1; path_parse(vval, &pnp); dstr_init_buf(&s_grist, pnp.f_grist.ptr, pnp.f_grist.len); @@ -518,12 +518,14 @@ static void process_selectors (dstring_t *res, const char *s, const char *e, LOL pnp.f_member.len = 1; if (wasass) dstr_cpy(&s_member, &mval); break; +/* case 'P': if (wasass) { printf("FATAL: invalid selector assign: 'P'\n"); exit(42); } //if (edits->parent) path_parent(&pathname); pnp.f_grist.len = pnp.f_root.len = pnp.f_dir.len = 1; pnp.f_base.len = pnp.f_suffix.len = pnp.f_member.len = 0; break; +*/ default: printf("FATAL: invalid selector: '%c'\n", mc); exit(42); } } -- 2.11.4.GIT