forked from extern/nushell
8f9dd6516e
`left =~ right` return true if left contains right, using Rust's `String::contains`. `!~` is the negated version. A new `apply_operator` function is added which decouples evaluation from `Value::compare`. This returns a `Value` and opens the door to implementing `+` for example, though it wouldn't be useful immediately. The `operator!` macro had to be changed slightly as it would choke on `~` in arguments.
8 lines
141 B
Rust
8 lines
141 B
Rust
use derive_new::new;
|
|
use nu_parser::hir;
|
|
|
|
#[derive(new, Debug, Eq, PartialEq)]
|
|
pub(crate) struct Command {
|
|
pub(crate) args: hir::Call,
|
|
}
|