aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-07-17 01:50:56 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-07-17 01:54:20 +0300
commitfb20738f3033358e79b0f98b46de93190cb0acfb (patch)
tree2e9a400b6f9c6888a3099ca37f0d6a38a6e5d732 /src
parentf7872893e0bfb1b4302e6ee6cb10afce5802a3aa (diff)
downloadidest-fb20738f3033358e79b0f98b46de93190cb0acfb.tar.gz
idest-fb20738f3033358e79b0f98b46de93190cb0acfb.tar.bz2
Implement a shortcut for --set mode.
* src/cmdline.opt: If MODE_MOD is set, accept assignments before file list. * NEWS: Update.
Diffstat (limited to 'src')
-rw-r--r--src/cmdline.opt10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cmdline.opt b/src/cmdline.opt
index c1de3b5..214cd27 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -189,5 +189,13 @@ OPTIONS_END
void
get_options(int argc, char *argv[])
{
- GETOPT(argc, argv)
+ GETOPT(argc, argv)
+ if (mode == MODE_MOD) {
+ char *p;
+ /* See if we've been given any assignment arguments */
+ while (p = strchr(argv[optind], '=')) {
+ *p++ = 0;
+ input_list_add_assignment(argv[optind++], p);
+ }
+ }
}

Return to:

Send suggestions and report system problems to the System administrator.