aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--NEWS9
-rw-r--r--src/cmdline.opt10
2 files changed, 17 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 3390df0..5a618ef 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-IdEst -- history of user-visible changes. 2011-07-12
+IdEst -- history of user-visible changes. 2011-07-17
Copyright (C) 2009-2011 Sergey Poznyakoff
See the end of file for copying conditions.
@@ -11,6 +11,13 @@ Version 1.2.90, Git
idest --info shows information about input file structure.
+* Set mode shortcut.
+
+When setting frames, you can omit the --set option from all
+assignments, except the first one, e.g.:
+
+ idest --set track=1 year=1985 album=Maremar track01.mp3
+
* The --convert option
The argument to --convert option is either a single major version
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.