aboutsummaryrefslogtreecommitdiffhomepage
path: root/expand.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2007-01-19 02:27:00 +1000
committerGravatar axel <axel@liljencrantz.se>2007-01-19 02:27:00 +1000
commit421aff7d67a82aa217550fd428fcf215f55ef4dc (patch)
tree796c177aab2f05033d64e69e2e47620e469fd4c8 /expand.c
parent9e7094adfcbb2cfb63f1ea6ac587354dd3463e48 (diff)
Make command specific completions handle quoted and otherwise escaped tokens better by making sure that the output from the commandline builtin is properly unescaped
darcs-hash:20070118162700-ac50b-cd93d9a6aff5bb7629a790d60b241000eb1d0ac0.gz
Diffstat (limited to 'expand.c')
-rw-r--r--expand.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/expand.c b/expand.c
index 8088e457..f3b55b37 100644
--- a/expand.c
+++ b/expand.c
@@ -1584,8 +1584,14 @@ int expand_string( void *context,
{
wchar_t *next;
- next = expand_unescape( (wchar_t *)al_get( in, i ),
- 1);
+ /*
+ We accept incomplete strings here, since complete uses
+ expand_string to expand incomplete strings from the
+ commandline.
+ */
+ int unescape_flags = UNESCAPE_SPECIAL | UNESCAPE_INCOMPLETE;
+
+ next = expand_unescape( (wchar_t *)al_get( in, i ), unescape_flags );
free( (void *)al_get( in, i ) );