fix(CLI): request value cursor handling and docs

* now the cursor will only be set permanently if the -r flag is used in
  'cursor' mode. In 'cursor=value' mode, the cursor change doesn't
  persist among the flags. That way, one can easily distinguish
  between setting the cursor, and setting a field. However,
  '...sublevel.level=value' will still work as it did previously, yet
  the cursor change will not persist.
* Documentation was adjusted to represent the new cursor style.

Fixes #86
This commit is contained in:
Sebastian Thiel
2015-04-26 07:49:19 +02:00
parent 2f3b2d24ce
commit b6a48bdcd5
4 changed files with 31 additions and 14 deletions

View File

@@ -103,7 +103,7 @@ pub fn parse_kv_arg<'a>(kv: &'a str, err: &mut InvalidOptionsError, for_hashmap:
let key = &kv[..pos];
if kv.len() <= pos + 1 {
add_err();
return (key, None)
return (key, Some(""))
}
(key, Some(&kv[pos+1..]))
}