diff options
author | Andrew Gallant <jamslam@gmail.com> | 2017-01-11 18:53:35 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2017-01-11 18:53:35 -0500 |
commit | 7a951f103a2abeba5af53905e168a09179704b48 (patch) | |
tree | 83cee8bdfd1ce27760db0def305197f2044e67df /src | |
parent | c3de1f58ea45fec442da21e9e1174e4269f64998 (diff) |
Make --column imply --line-number.
Closes #243
Diffstat (limited to 'src')
-rw-r--r-- | src/app.rs | 3 | ||||
-rw-r--r-- | src/args.rs | 1 |
2 files changed, 3 insertions, 1 deletions
@@ -315,7 +315,8 @@ lazy_static! { "Show column numbers", "Show column numbers (1-based). This only shows the column \ numbers for the first match on each line. This does not try \ - to account for Unicode. One byte is equal to one column."); + to account for Unicode. One byte is equal to one column. This \ + implies --line-number."); doc!(h, "context-separator", "Set the context separator string. [default: --]", "The string used to separate non-contiguous context lines in the \ diff --git a/src/args.rs b/src/args.rs index 594ece09..6030964e 100644 --- a/src/args.rs +++ b/src/args.rs @@ -583,6 +583,7 @@ impl<'a> ArgMatches<'a> { false } else { self.is_present("line-number") + || self.is_present("column") || atty::on_stdout() || self.is_present("pretty") || self.is_present("vimgrep") |