diff options
author | epoch <epoch@thebackupbox.net> | 2022-08-19 02:11:19 -0500 |
---|---|---|
committer | epoch <epoch@thebackupbox.net> | 2022-08-19 02:11:19 -0500 |
commit | 511ebda349763dbdbaeb64fea5732e7953726bd3 (patch) | |
tree | d59a43b2b3b95a201e19ee066c6526db6cbb2a4f | |
parent | b5b1d77dfd83853b5f4a945e02fbc9269114fe05 (diff) | |
download | uritools-511ebda349763dbdbaeb64fea5732e7953726bd3.tar.gz uritools-511ebda349763dbdbaeb64fea5732e7953726bd3.zip |
added the ability to use blank match lines to match anything
-rw-r--r-- | urigetline.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/urigetline.c b/urigetline.c index 4c5c7b4..92b4de7 100644 --- a/urigetline.c +++ b/urigetline.c @@ -80,6 +80,7 @@ int main(int argc,char *argv[]) {//argument needs to be the URI rule=MATCH_PATTERN; j=0; switch(a[0]) { + case 0: j=1; goto match; break; case '-': j=1; rule=MATCH_PATTERN; break; case 'n': j=1; rule=MATCH_UNEXIST; break; case 'r': j=1; rule=MATCH_REVERSE; break; @@ -120,6 +121,7 @@ int main(int argc,char *argv[]) {//argument needs to be the URI a=c; } if(matches) { +match: //printf("comm: %s\n",command); printf("%s\n",command); if(!all) return ret;//bail early if we only need first match |