Fallback to filename for +arg (#9333)
This commit is contained in:
parent
17dd102e5c
commit
054ce3961a
1 changed files with 3 additions and 4 deletions
|
@ -90,10 +90,9 @@ impl Args {
|
|||
}
|
||||
}
|
||||
arg if arg.starts_with('+') => {
|
||||
let arg = &arg[1..];
|
||||
line_number = match arg.parse::<usize>() {
|
||||
Ok(n) => n.saturating_sub(1),
|
||||
_ => anyhow::bail!("bad line number after +"),
|
||||
match arg[1..].parse::<usize>() {
|
||||
Ok(n) => line_number = n.saturating_sub(1),
|
||||
_ => args.files.push(parse_file(arg)),
|
||||
};
|
||||
}
|
||||
arg => args.files.push(parse_file(arg)),
|
||||
|
|
Loading…
Reference in a new issue