diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2009-03-14 12:43:10 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2009-03-14 12:43:10 +0100 |
commit | cf1860349182503523975fb8084d514407a75fb4 (patch) | |
tree | 24fbf737c0204f763ae0a29705706d4786308c3d /client | |
parent | f16ad72ed76c398f081b97b09d56f4b199822464 (diff) | |
download | bird-cf1860349182503523975fb8084d514407a75fb4.tar bird-cf1860349182503523975fb8084d514407a75fb4.zip |
New syntax for bgp_path
Diffstat (limited to 'client')
-rw-r--r-- | client/client.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/client/client.c b/client/client.c index 6e465bc..6a217c7 100644 --- a/client/client.c +++ b/client/client.c @@ -168,22 +168,28 @@ input_complete(int arg UNUSED, int key UNUSED) static int input_help(int arg, int key UNUSED) { - int i, in_string, in_path; + int i, in_string, in_bracket; if (arg != 1) return rl_insert(arg, '?'); - in_string = in_path = 0; + in_string = in_bracket = 0; for (i = 0; i < rl_point; i++) { + if (rl_line_buffer[i] == '"') in_string = ! in_string; - else if ((rl_line_buffer[i] == '|') && (! in_string)) - in_path = ! in_path; + else if (! in_string) + { + if (rl_line_buffer[i] == '[') + in_bracket++; + else if (rl_line_buffer[i] == ']') + in_bracket--; + } } /* `?' inside string or path -> insert */ - if (in_string || in_path) + if (in_string || in_bracket) return rl_insert(1, '?'); rl_begin_undo_group(); /* HACK: We want to display `?' at point position */ |