diff --git a/.nushell/mod.nu b/.nushell/mod.nu new file mode 100644 index 0000000000000000000000000000000000000000..c6e1c6a989cbb533ae4ab2a9f20d1c140e2b11e6 --- /dev/null +++ b/.nushell/mod.nu @@ -0,0 +1,9 @@ +export module binary.nu +export module cargo.nu +export module color.nu +export module error.nu +export module formats.nu +export module fs.nu +export module math.nu +export module parse.nu +export module plot.nu diff --git a/.nushell/plot.nu b/.nushell/plot.nu index 76d5c7dc1fe388094815e70a48c309fd17a91082..b31a4058e80a6f14b288dbb2fdc57b952611d16f 100644 --- a/.nushell/plot.nu +++ b/.nushell/plot.nu @@ -1,5 +1,3 @@ -use venv.nu VENV - export const COMMON_OPTIONS = [ --x-scale log --x-scale-base 2 @@ -70,6 +68,5 @@ export def into-axis-options [-x: string, -y: string]: table<x: float, y: float> } export def --wrapped gplt [...args: string] { - overlay use $VENV ^gplt ...$args } diff --git a/.nushell/venv.nu b/.nushell/venv.nu deleted file mode 100644 index 38a6002b186445e2472ece6fcb38a3cc653c6b3d..0000000000000000000000000000000000000000 --- a/.nushell/venv.nu +++ /dev/null @@ -1 +0,0 @@ -export const VENV = ($nu.home-path | path join ".local/share/venvs/gplt/bin/activate.nu") diff --git a/README.md b/README.md index ae38c5eb1ecc45b13b9e02bb6893017fb8477d63..35f4be8d36d37311ffd20688348dc654898d2feb 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Komodo provides a bunch of other binaries that might be interesting of useful to The easiest is to use the `cargo.nu` Nushell module as follows ```bash -use .nushell/cargo.nu "cargo bin" +use .nushell cargo "cargo bin" help cargo bin ``` diff --git a/benchmarks/.nushell/commit/plot.nu b/benchmarks/.nushell/commit/plot.nu index c0b9e95b799859de2f6e6afef3afc2da9727fad7..576b200fb94a2e8bfdb92d68d1fb8bdbc98e71ad 100644 --- a/benchmarks/.nushell/commit/plot.nu +++ b/benchmarks/.nushell/commit/plot.nu @@ -1,6 +1,6 @@ -use ../../../.nushell/math.nu * -use ../../../.nushell/fs.nu check-file -use ../../../.nushell/plot.nu [ into-axis-options, COMMON_OPTIONS, gplt ] +use ../../../.nushell math * +use ../../../.nushell fs check-file +use ../../../.nushell plot [ into-axis-options, COMMON_OPTIONS, gplt ] export def main [data: path, --save: path] { check-file $data --span (metadata $data).span diff --git a/benchmarks/.nushell/fec/plot.nu b/benchmarks/.nushell/fec/plot.nu index 1d6efeb62c9a638ce293bb99c04a26ab599c71f3..9ed47a41d33e39ff184f8bb3ee1cb967a594a3a3 100644 --- a/benchmarks/.nushell/fec/plot.nu +++ b/benchmarks/.nushell/fec/plot.nu @@ -1,7 +1,7 @@ -use ../../../.nushell/math.nu * -use ../../../.nushell/plot.nu [ into-axis-options, COMMON_OPTIONS ] -use ../../../.nushell/fs.nu check-file -use ../../../.nushell/plot.nu gplt +use ../../../.nushell math * +use ../../../.nushell plot [ into-axis-options, COMMON_OPTIONS ] +use ../../../.nushell fs check-file +use ../../../.nushell plot gplt export def encoding [data: path, --save: path] { check-file $data --span (metadata $data).span diff --git a/benchmarks/.nushell/fec/run.nu b/benchmarks/.nushell/fec/run.nu index 8eccebecf59ad2ca466d926c0829ac4a15703ec8..ceafe8adc88d8d959a484928d34d29c45a93cf08 100644 --- a/benchmarks/.nushell/fec/run.nu +++ b/benchmarks/.nushell/fec/run.nu @@ -1,4 +1,4 @@ -use ../../../.nushell/formats.nu * +use ../../../.nushell formats * export def main [ --output: path = "./fec.ndjson", diff --git a/benchmarks/.nushell/recoding/plot.nu b/benchmarks/.nushell/recoding/plot.nu index 64657f1a6323ecbc9355e8e97b3442fde3e3b3e2..ccc32ec2da161142cadeb9c61b3ec31d6f616636 100644 --- a/benchmarks/.nushell/recoding/plot.nu +++ b/benchmarks/.nushell/recoding/plot.nu @@ -1,7 +1,7 @@ -use ../../../.nushell/math.nu * -use ../../../.nushell/plot.nu [ into-axis-options, COMMON_OPTIONS ] -use ../../../.nushell/fs.nu check-file -use ../../../.nushell/plot.nu gplt +use ../../../.nushell math * +use ../../../.nushell plot [ into-axis-options, COMMON_OPTIONS ] +use ../../../.nushell fs check-file +use ../../../.nushell plot gplt export def main [data: path, --save: path] { check-file $data --span (metadata $data).span diff --git a/benchmarks/.nushell/recoding/run.nu b/benchmarks/.nushell/recoding/run.nu index 0bd79e73104d0d7ef463775a8e22d117cd638e72..9b42ae723ea39c38a070e25f8d360efc111ed642 100644 --- a/benchmarks/.nushell/recoding/run.nu +++ b/benchmarks/.nushell/recoding/run.nu @@ -1,4 +1,4 @@ -use ../../../.nushell/formats.nu * +use ../../../.nushell formats * export def main [ --output: path = "./recoding.ndjson", diff --git a/benchmarks/.nushell/setup/plot.nu b/benchmarks/.nushell/setup/plot.nu index c2ce80e4f5233d7a4f3adf2cf390e97557d2855d..c0ff7b9fee0e5a74ca856ad78efbf27c15f98447 100644 --- a/benchmarks/.nushell/setup/plot.nu +++ b/benchmarks/.nushell/setup/plot.nu @@ -1,6 +1,6 @@ -use ../../../.nushell/math.nu * -use ../../../.nushell/fs.nu check-file -use ../../../.nushell/plot.nu [ into-axis-options, COMMON_OPTIONS, gplt ] +use ../../../.nushell math * +use ../../../.nushell fs check-file +use ../../../.nushell plot [ into-axis-options, COMMON_OPTIONS, gplt ] export def main [data: path, --save: path] { check-file $data --span (metadata $data).span diff --git a/bins/inbreeding/plot.nu b/bins/inbreeding/plot.nu index 189b09fd833b608e4f6a1a1dd57a065404a2f9c3..abb10a2428c731d74974cc386cc65aaf8cc0affc 100644 --- a/bins/inbreeding/plot.nu +++ b/bins/inbreeding/plot.nu @@ -1,9 +1,9 @@ use std repeat use consts.nu -use ../../.nushell/plot.nu gplt -use ../../.nushell/color.nu * -use ../../.nushell/error.nu "error throw" +use ../../.nushell plot gplt +use ../../.nushell color * +use ../../.nushell error "error throw" def "parse strategy" []: string -> record<type: string> { let s = $in diff --git a/bins/inbreeding/run.nu b/bins/inbreeding/run.nu index 920b0a19fc9158078c46df92ec045b3c3dcf4f34..f18f72c17d3338606a81fc7fc9c41a923ba12729 100644 --- a/bins/inbreeding/run.nu +++ b/bins/inbreeding/run.nu @@ -1,5 +1,5 @@ use consts.nu -use ../../.nushell/cargo.nu "cargo bin" +use ../../.nushell cargo "cargo bin" export def main [ --options: record< diff --git a/examples/cli.nu b/examples/cli.nu index c0cc5c729713bab3834e42b1ccc34589f401e768..12b750254287fc2529739d3049c1973c6f4a8930 100755 --- a/examples/cli.nu +++ b/examples/cli.nu @@ -7,7 +7,7 @@ use ../komodo.nu [ "komodo reconstruct", "komodo ls", ] -use ../.nushell/binary.nu [ "bytes from_int" ] +use ../.nushell binary [ "bytes from_int" ] use std assert diff --git a/komodo.nu b/komodo.nu index f0addc706ee6243bee1bf6e04a21f2d153eeb214..38b51c1af6dca9e3fec00544d328621aacd806aa 100644 --- a/komodo.nu +++ b/komodo.nu @@ -2,7 +2,7 @@ # # please run `komodo --help` or `komodo <tab>` to have a look at more information -use .nushell/binary.nu ["bytes from_int"] +use .nushell binary ["bytes from_int"] const KOMODO_BINARY = "./target/release/komodo" const DEFAULT_LOG_LEVEL = "INFO" diff --git a/tests/binary.nu b/tests/binary.nu index 8f45732ec166a2c61fe1c8050f87ff8620d19a2e..1cb755f6973d16eb5d880a2b8f5ff9f69bf2593e 100644 --- a/tests/binary.nu +++ b/tests/binary.nu @@ -1,4 +1,4 @@ -use ../.nushell/binary.nu [ +use ../.nushell binary [ "bytes decode", "bytes encode", "bytes from_int", "bytes to_int" ] diff --git a/tests/cli.nu b/tests/cli.nu index 637fcb8f54ca04a96d8b87998b27453120f631b2..fd149dffc408d21f43ef55b8f4cfd4ed2882b864 100644 --- a/tests/cli.nu +++ b/tests/cli.nu @@ -7,7 +7,7 @@ use ../komodo.nu [ "komodo ls", "komodo clean", ] -use ../.nushell/binary.nu [ "bytes from_int" ] +use ../.nushell binary [ "bytes from_int" ] use std assert diff --git a/tests/color.nu b/tests/color.nu index 0374a9ea64787bfe8a92f34929b47f3195c4200e..276094472ea9e973dc68b7ef614a396bf79f65c8 100644 --- a/tests/color.nu +++ b/tests/color.nu @@ -1,4 +1,4 @@ -use ../.nushell/color.nu [ +use ../.nushell color [ "color from-floats", "color from-ints", "color from-string",