mirror of
https://github.com/nushell/nushell
synced 2024-12-25 12:33:17 +00:00
Fixed optional and required argument in signature.
This fixes issues like #1117
This commit is contained in:
parent
f9da7f7d58
commit
7ce1ddc6fd
1 changed files with 3 additions and 3 deletions
|
@ -17,9 +17,9 @@ macro_rules! signature {
|
|||
#[macro_export]
|
||||
macro_rules! positional {
|
||||
($ident:tt, $name:tt (optional $shape:tt) - $desc:tt) => {
|
||||
let $ident = $ident.required(stringify!($name), SyntaxShape::$shape, $desc);
|
||||
};
|
||||
($ident:tt, $name:tt ($shape:tt)- $desc:tt) => {
|
||||
let $ident = $ident.optional(stringify!($name), SyntaxShape::$shape, $desc);
|
||||
};
|
||||
($ident:tt, $name:tt ($shape:tt)- $desc:tt) => {
|
||||
let $ident = $ident.required(stringify!($name), SyntaxShape::$shape, $desc);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue