summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2008-01-28 11:21:57 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2008-01-28 11:21:57 -0800
commitcb3d25f05f47625def6444d0c3a94d7f8024f5ce (patch)
tree7132d3d8bcec61cebd53997f2100061e82a8fdbf
parentd6e59241730e6f458da6e77368b8b6b4d2626150 (diff)
downloadvyatta-cfg-cb3d25f05f47625def6444d0c3a94d7f8024f5ce.tar.gz
vyatta-cfg-cb3d25f05f47625def6444d0c3a94d7f8024f5ce.zip
skip spaces immediately after field names
-rw-r--r--etc/bash_completion.d/20vyatta-cfg2
-rw-r--r--src/cli_def.l4
2 files changed, 3 insertions, 3 deletions
diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg
index c8e4908..60676fe 100644
--- a/etc/bash_completion.d/20vyatta-cfg
+++ b/etc/bash_completion.d/20vyatta-cfg
@@ -355,7 +355,7 @@ vyatta_parse_tmpl_comp_fields ()
# $2: field name
sed -n '
/^'"$2"':/,$ {
- s/^'"$2"'://
+ s/^'"$2"':[ ]*//
h
:b
$ { x; p; q }
diff --git a/src/cli_def.l b/src/cli_def.l
index 8f32c51..c90b3c3 100644
--- a/src/cli_def.l
+++ b/src/cli_def.l
@@ -325,11 +325,11 @@ RE_ACT_FIELD (help|syntax|commit|delete|update|activate|create|begin|end|comp_he
return return_str(str_delim);
}
-{RE_ACT_FIELD}:expression: {
+{RE_ACT_FIELD}:expression:[ \t]* {
return return_act_field(yy_cli_def_text);
}
-{RE_ACT_FIELD}: {
+{RE_ACT_FIELD}:[ \t]* {
BEGIN(action);
return return_act_field(yy_cli_def_text);
}