Add bits shl and bits shr command (#6202)

* Add `bits shift-left` and `bits shift-right` command

* update bits shift error tips

* some code refactor

* update shift right

* some code refactor for bits shift commands

* rename bits shift commands align with bits operators

* update search term

* Update crates/nu-command/src/bits/not.rs

Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>

* Update crates/nu-command/src/bits/shift_left.rs

Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>

* Update crates/nu-command/src/bits/shift_right.rs

Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>

* ci skip

* change default number-bytes for bits shift

* fix bits not tests

* fix bits tests

Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
This commit is contained in:
Justin Ma
2022-08-03 04:52:04 +08:00
committed by GitHub
parent e7958bebac
commit ce6df93d05
12 changed files with 501 additions and 36 deletions

View File

@ -214,6 +214,8 @@ pub fn create_default_context() -> EngineState {
BitsNot,
BitsOr,
BitsXor,
BitsShiftLeft,
BitsShiftRight,
}
// Bytes