Commit
+3 -3 +/-1 browse
1 | diff --git a/meli/src/command/parser.rs b/meli/src/command/parser.rs |
2 | index a7b91d7..bf22343 100644 |
3 | --- a/meli/src/command/parser.rs |
4 | +++ b/meli/src/command/parser.rs |
5 | @@ -562,15 +562,15 @@ pub fn printenv(input: &[u8]) -> IResult<&[u8], Result<Action, CommandError>> { |
6 | Ok((input, Ok(PrintEnv(key.to_string())))) |
7 | } |
8 | pub fn currentdir(input: &[u8]) -> IResult<&[u8], Result<Action, CommandError>> { |
9 | - let mut check = arg_init! { min_arg:0, max_arg: 0, currentdir}; |
10 | - let (input, _) = tag("cwd")(input.ltrim())?; |
11 | + let mut check = arg_init! { min_arg:0, max_arg: 0, pwd}; |
12 | + let (input, _) = alt((tag("cwd"), tag("pwd")))(input.ltrim())?; |
13 | arg_chk!(start check, input); |
14 | arg_chk!(finish check, input); |
15 | let (input, _) = eof(input)?; |
16 | Ok((input, Ok(CurrentDirectory))) |
17 | } |
18 | pub fn change_currentdir(input: &[u8]) -> IResult<&[u8], Result<Action, CommandError>> { |
19 | - let mut check = arg_init! { min_arg:1, max_arg: 1, change_currentdir}; |
20 | + let mut check = arg_init! { min_arg: 1, max_arg: 1, cd}; |
21 | let (input, _) = tag("cd")(input.ltrim())?; |
22 | arg_chk!(start check, input); |
23 | let (input, _) = is_a(" ")(input)?; |