>From 0994f18671dc9c080b01af9c6005a19c7edac17c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Droz?= Date: Fri, 27 May 2011 14:55:02 +0200 Subject: [PATCH 1/3] added char *word_breaks to the COMPSPEC struct. It will allow registration of a $COMP_WORDBREAKS equivalent on a per-completion basis. --- pcomplete.h | 1 + pcomplib.c | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/pcomplete.h b/pcomplete.h index 6c1a664..31ef3cb 100644 --- a/pcomplete.h +++ b/pcomplete.h @@ -37,6 +37,7 @@ typedef struct compspec { char *command; char *lcommand; char *filterpat; + char *word_breaks; } COMPSPEC; /* Values for COMPSPEC actions. These are things the shell knows how to diff --git a/pcomplib.c b/pcomplib.c index fe337e4..5d812c7 100644 --- a/pcomplib.c +++ b/pcomplib.c @@ -64,6 +64,7 @@ compspec_create () ret->command = (char *)NULL; ret->lcommand = (char *)NULL; ret->filterpat = (char *)NULL; + ret->word_breaks = (char *)NULL; return ret; } @@ -83,6 +84,7 @@ compspec_dispose (cs) FREE (cs->command); FREE (cs->lcommand); FREE (cs->filterpat); + FREE (cs->word_breaks); free (cs); } @@ -108,6 +110,7 @@ compspec_copy (cs) new->command = STRDUP (cs->command); new->lcommand = STRDUP (cs->lcommand); new->filterpat = STRDUP (cs->filterpat); + new->word_breaks = STRDUP (cs->word_breaks); return new; } -- 1.7.3.4