ref: 850306c11ce04add5baca0bc5e28a0b381e603f4
parent: e5995fcd7b8ebe090a578d6bf00525c0e031ab78
author: robs <robs>
date: Wed Mar 25 13:44:50 EDT 2009
sox --info = soxi
--- a/sox.1
+++ b/sox.1
@@ -720,6 +720,12 @@
Show information about the specified file format. The name
\fBall\fR can be used to show information on all formats.
.TP
+\fB\-\-i\fR, \fB\-\-info\fR
+Only if given as the first parameter to
+.BR sox ,
+behave as
+.BR soxi (1).
+.TP
\fB\-\-interactive\fR
Prompt before overwriting an existing file with the same name as that
given for the output file.
--- a/src/sox.c
+++ b/src/sox.c
@@ -1749,6 +1749,7 @@
"-h, --help Display version number and usage information",
"--help-effect NAME Show usage of effect NAME, or NAME=all for all",
"--help-format NAME Show info on format NAME, or NAME=all for all",
+"--i, --info Behave as soxi(1)",
"--input-buffer BYTES Override the input buffer size (default: as --buffer)",
"--interactive Prompt to overwrite output file",
"-m, --combine mix Mix multiple input files (instead of concatenating)",
@@ -2590,6 +2591,10 @@
sox_mode = sox_rec;
else if (lsx_strends(myname, "soxi"))
sox_mode = sox_soxi;
+
+ if (!sox_mode && argc > 1 &&
+ (!strcmp(argv[1], "--i") || !strcmp(argv[1], "--info")))
+ --argc, ++argv, sox_mode = sox_soxi;
if (sox_init() != SOX_SUCCESS)
exit(1);