diff --git a/Cargo.lock b/Cargo.lock index 45ab8ebe2..8db4a1808 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -871,30 +871,31 @@ dependencies = [ [[package]] name = "heim" -version = "0.0.7" +version = "0.0.8-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "heim-common 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-cpu 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-derive 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-disk 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-host 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-memory 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-net 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-process 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-runtime 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-sensors 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-virt 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-common 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-cpu 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-derive 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-disk 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-host 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-memory 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-net 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-process 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-runtime 0.0.4-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-sensors 0.0.3-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-virt 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "heim-common" -version = "0.0.7" +version = "0.0.8-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "mach 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -906,13 +907,13 @@ dependencies = [ [[package]] name = "heim-cpu" -version = "0.0.7" +version = "0.0.8-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-common 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-derive 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-runtime 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-common 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-derive 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-runtime 0.0.4-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "mach 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -921,7 +922,7 @@ dependencies = [ [[package]] name = "heim-derive" -version = "0.0.7" +version = "0.0.8-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -931,15 +932,15 @@ dependencies = [ [[package]] name = "heim-disk" -version = "0.0.7" +version = "0.0.8-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-common 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-derive 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-runtime 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-common 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-derive 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-runtime 0.0.4-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "mach 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "widestring 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -948,13 +949,13 @@ dependencies = [ [[package]] name = "heim-host" -version = "0.0.7" +version = "0.0.8-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-common 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-derive 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-runtime 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-common 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-derive 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-runtime 0.0.4-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "mach 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -964,13 +965,13 @@ dependencies = [ [[package]] name = "heim-memory" -version = "0.0.7" +version = "0.0.8-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-common 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-derive 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-runtime 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-common 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-derive 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-runtime 0.0.4-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "mach 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -979,15 +980,15 @@ dependencies = [ [[package]] name = "heim-net" -version = "0.0.7" +version = "0.0.8-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-common 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-derive 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-runtime 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-common 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-derive 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-runtime 0.0.4-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "macaddr 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -995,56 +996,58 @@ dependencies = [ [[package]] name = "heim-process" -version = "0.0.7" +version = "0.0.8-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "darwin-libproc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-common 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-cpu 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-derive 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-net 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-runtime 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-common 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-cpu 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-derive 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-host 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-net 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-runtime 0.0.4-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "mach 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "ntapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "heim-runtime" -version = "0.0.3" +version = "0.0.4-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-common 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-common 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "heim-sensors" -version = "0.0.2" +version = "0.0.3-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-common 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-derive 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-runtime 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-common 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-derive 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-runtime 0.0.4-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "heim-virt" -version = "0.0.7" +version = "0.0.8-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-common 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "heim-runtime 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "raw-cpuid 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-common 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heim-runtime 0.0.4-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1052,6 +1055,11 @@ name = "hex" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "hex" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "http" version = "0.1.18" @@ -1504,7 +1512,7 @@ dependencies = [ [[package]] name = "nu" -version = "0.2.0" +version = "0.3.0" dependencies = [ "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1532,7 +1540,7 @@ dependencies = [ "getset 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "git2 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "heim 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "heim 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2045,7 +2053,7 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "6.1.0" +version = "7.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3086,19 +3094,20 @@ dependencies = [ "checksum git2 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39f27186fbb5ec67ece9a56990292bc5aed3c3fc51b9b07b0b52446b1dfb4a82" "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -"checksum heim 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "4e61bf22465c7f49852fd7e6044a395394962a2eaac0b5c1b87b5b0f010b0f48" -"checksum heim-common 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "81e38b3fc29d7888133d0ada8bc083487386fd930f3c8fd34a528a2aa4352a3a" -"checksum heim-cpu 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "307f12a429cfe56c92413f98a6e1a28f72d715b9f65fbfdf2e98f15bd38293c6" -"checksum heim-derive 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "addd10c94d06b172f816a1969253c2dd8a3f633e165d8e018e0be873d67f8cac" -"checksum heim-disk 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "2ee4860d01ea623512bcd1d2d54e4566d482f2d4568789562b13d4b8cc294f00" -"checksum heim-host 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1c6dee47910be9b5fb323ec6bf7462773a8bee67b65e5fe5d652f3e20b3ecab9" -"checksum heim-memory 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "30f5e88edcafd7ee6061997d171f84c153fabdd6459d739b45d7f05193d7f98c" -"checksum heim-net 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5e5b265598f9d3ca525f54a394153e3e738af9795ac5be7c364d55a7be857e69" -"checksum heim-process 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "2165577ccfce4d038de4ca66cbb5c226e1691dff62c778cac6717455dc9ef28d" -"checksum heim-runtime 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4c23e20c02d9df62dbed41273e99ad70c9ebd8799f35ac672086f8cc584d09" -"checksum heim-sensors 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e641fab2e31c4b2039451a713dc92a5daacf84c617c803c946b8081fe8132142" -"checksum heim-virt 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "331b1486ed710843c551ac3a8ddb2721dd5345b3939f995ce0dbe453ba901b06" +"checksum heim 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "02692a4aa3bed77933da9ae7915aef7fcceb65eff9d9251be189b1acc0b77f65" +"checksum heim-common 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "559807533108e09863125eeccb38a7213cef5a7a7deadd3fac2674e1f8d3db70" +"checksum heim-cpu 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "60c237652eaa091b39f996deb41aa7baae67cab5f25204154c14414f46ef69c1" +"checksum heim-derive 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3f326db96a03106afcea6839b13f7d95b09cffd063eaa94ef0fd3e796214a66" +"checksum heim-disk 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bd75c64f2d054ce1297ad08f2ca41bf7db7e9ca868221b2fb7427210579e85a1" +"checksum heim-host 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6401c858723568a09e0f09e09bda833e0019c34aa512ccdeba236fce45e4eeb1" +"checksum heim-memory 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "424a549b6c3faecc2492cd3d49f1f89ed9f191c7995741b89e674b85a262e303" +"checksum heim-net 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d0ebbcbabe86dbc1c8713ecc1f54630549f82fa07520083cf9a0edcdd77d329a" +"checksum heim-process 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "564f0d9d123c708688721fb2c2aacc198bd5eec3d995eb8c25d369500c66ca7d" +"checksum heim-runtime 0.0.4-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "df59b2a6e00b7f4532dc00736d74bf721a4587d4dbf90793c524ed0a7eddfa19" +"checksum heim-sensors 0.0.3-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "512afc3c0562aa26ae4e236a4b371901fbf7ddac843c961b2ef201936e79a7cd" +"checksum heim-virt 0.0.8-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "95372a84d2a0a5709899449fbb8ed296a9ce5b9fc0ba4729f0c26f7d5ebdf155" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" +"checksum hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" "checksum http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "372bcb56f939e449117fb0869c2e8fd8753a8223d92a172c6e808cf123a5b6e4" "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" @@ -3204,7 +3213,7 @@ dependencies = [ "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum raw-cpuid 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "30a9d219c32c9132f7be513c18be77c9881c7107d2ab5569d205a6a0f0e6dc7d" +"checksum raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf" "checksum rawkey 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "33ec17a493dcb820725c002bc253f6f3ba4e4dc635e72c238540691b05e43897" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum readkey 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d98db94bb4f3e926c8d8186547cd9366d958d753aff5801214d93d38214e8f0f" diff --git a/Cargo.toml b/Cargo.toml index e28674d7b..6da254c18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nu" -version = "0.2.0" +version = "0.3.0" authors = ["Yehuda Katz ", "Jonathan Turner ", "Andrés N. Robalino "] description = "A shell for the GitHub era" license = "MIT" @@ -79,7 +79,7 @@ neso = { version = "0.5.0", optional = true } crossterm = { version = "0.10.2", optional = true } syntect = {version = "3.2.0", optional = true } onig_sys = {version = "=69.1.0", optional = true } -heim = {version = "0.0.7", optional = true } +heim = {version = "0.0.8-alpha.1", optional = true } battery = {version = "0.7.4", optional = true } rawkey = {version = "0.1.2", optional = true } clipboard = {version = "0.5", optional = true } diff --git a/README.md b/README.md index 202c88f36..85b4dc30b 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,7 @@ We can pipeline this into a command that gets the contents of one of the columns ━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━┯━━━━━━┯━━━━━━━━━ authors │ description │ edition │ license │ name │ version ─────────────────┼────────────────────────────┼─────────┼─────────┼──────┼───────── - [table: 3 rows] │ A shell for the GitHub era │ 2018 │ ISC │ nu │ 0.2.0 + [table: 3 rows] │ A shell for the GitHub era │ 2018 │ ISC │ nu │ 0.3.0 ━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━┷━━━━━━┷━━━━━━━━━ ``` @@ -174,7 +174,7 @@ Finally, we can use commands outside of Nu once we have the data we want: ``` /home/jonathan/Source/nushell(master)> open Cargo.toml | get package.version | echo $it -0.2.0 +0.3.0 ``` Here we use the variable `$it` to refer to the value being piped to the external command. diff --git a/src/cli.rs b/src/cli.rs index 82413ec9a..7b5d49751 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -360,7 +360,8 @@ pub async fn cli() -> Result<(), Box> { // Register Ctrl-r for history fuzzy search // rustyline doesn't support custom commands, so we override Ctrl-D (EOF) - #[cfg(not(windows))] // https://github.com/nushell/nushell/issues/689 + // https://github.com/nushell/nushell/issues/689 + #[cfg(all(not(windows), feature = "crossterm"))] rl.bind_sequence(rustyline::KeyPress::Ctrl('R'), rustyline::Cmd::EndOfFile); // Redefine Ctrl-D to same command as Ctrl-C rl.bind_sequence(rustyline::KeyPress::Ctrl('D'), rustyline::Cmd::Interrupt); diff --git a/src/commands/echo.rs b/src/commands/echo.rs index 453041bbc..21188f54f 100644 --- a/src/commands/echo.rs +++ b/src/commands/echo.rs @@ -16,7 +16,7 @@ impl PerItemCommand for Echo { } fn usage(&self) -> &str { - "Echo the argments back to the user." + "Echo the arguments back to the user." } fn run( diff --git a/src/commands/help.rs b/src/commands/help.rs index 4ddd147b4..e8c458caa 100644 --- a/src/commands/help.rs +++ b/src/commands/help.rs @@ -28,18 +28,11 @@ impl PerItemCommand for Help { ) -> Result { let tag = call_info.name_tag; - if call_info.args.len() == 0 { - return Ok(vec![Ok(ReturnSuccess::Action(CommandAction::EnterHelpShell( - Value::nothing().tagged(tag), - )))] - .into()); - } - - match call_info.args.expect_nth(0)? { - Tagged { + match call_info.args.nth(0) { + Some(Tagged { item: Value::Primitive(Primitive::String(document)), tag, - } => { + }) => { let mut help = VecDeque::new(); if document == "commands" { let mut sorted_names = registry.names(); diff --git a/src/commands/nth.rs b/src/commands/nth.rs index bf397e1bc..18bb6f23a 100644 --- a/src/commands/nth.rs +++ b/src/commands/nth.rs @@ -16,7 +16,7 @@ impl WholeStreamCommand for Nth { } fn signature(&self) -> Signature { - Signature::build("nth").required("amount", SyntaxShape::Any) + Signature::build("nth").required("row number", SyntaxShape::Any) } fn usage(&self) -> &str { diff --git a/src/fuzzysearch.rs b/src/fuzzysearch.rs index b27745590..5cb08dd3f 100644 --- a/src/fuzzysearch.rs +++ b/src/fuzzysearch.rs @@ -1,4 +1,5 @@ use ansi_term::{ANSIString, ANSIStrings, Colour, Style}; +#[cfg(feature = "crossterm")] use crossterm::{cursor, terminal, ClearType, InputEvent, KeyEvent, RawScreen}; use std::io::Write; use sublime_fuzzy::best_match; @@ -18,76 +19,78 @@ pub fn interactive_fuzzy_search(lines: &Vec<&str>, max_results: usize) -> Select Edit(String), } let mut state = State::Selecting; - if let Ok(_raw) = RawScreen::into_raw_mode() { - // User input for search - let mut searchinput = String::new(); - let mut selected = 0; + #[cfg(feature = "crossterm")] + { + if let Ok(_raw) = RawScreen::into_raw_mode() { + // User input for search + let mut searchinput = String::new(); + let mut selected = 0; - let mut cursor = cursor(); - let _ = cursor.hide(); - let input = crossterm::input(); - let mut sync_stdin = input.read_sync(); + let mut cursor = cursor(); + let _ = cursor.hide(); + let input = crossterm::input(); + let mut sync_stdin = input.read_sync(); - while state == State::Selecting { - let mut selected_lines = fuzzy_search(&searchinput, &lines, max_results); - let num_lines = selected_lines.len(); - paint_selection_list(&selected_lines, selected); - if let Some(ev) = sync_stdin.next() { - match ev { - InputEvent::Keyboard(k) => match k { - KeyEvent::Esc | KeyEvent::Ctrl('c') => { - state = State::Quit; - } - KeyEvent::Up => { - if selected > 0 { - selected -= 1; + while state == State::Selecting { + let mut selected_lines = fuzzy_search(&searchinput, &lines, max_results); + let num_lines = selected_lines.len(); + paint_selection_list(&selected_lines, selected); + if let Some(ev) = sync_stdin.next() { + match ev { + InputEvent::Keyboard(k) => match k { + KeyEvent::Esc | KeyEvent::Ctrl('c') => { + state = State::Quit; } - } - KeyEvent::Down => { - if selected + 1 < selected_lines.len() { - selected += 1; + KeyEvent::Up => { + if selected > 0 { + selected -= 1; + } } - } - KeyEvent::Char('\n') => { - state = if selected_lines.len() > 0 { - State::Selected(selected_lines.remove(selected).text) - } else { - State::Edit("".to_string()) - }; - } - KeyEvent::Char('\t') | KeyEvent::Right => { - state = if selected_lines.len() > 0 { - State::Edit(selected_lines.remove(selected).text) - } else { - State::Edit("".to_string()) - }; - } - KeyEvent::Char(ch) => { - searchinput.push(ch); - selected = 0; - } - KeyEvent::Backspace => { - searchinput.pop(); - selected = 0; - } - _ => { - // println!("OTHER InputEvent: {:?}", k); - } - }, - _ => {} + KeyEvent::Down => { + if selected + 1 < selected_lines.len() { + selected += 1; + } + } + KeyEvent::Char('\n') => { + state = if selected_lines.len() > 0 { + State::Selected(selected_lines.remove(selected).text) + } else { + State::Edit("".to_string()) + }; + } + KeyEvent::Char('\t') | KeyEvent::Right => { + state = if selected_lines.len() > 0 { + State::Edit(selected_lines.remove(selected).text) + } else { + State::Edit("".to_string()) + }; + } + KeyEvent::Char(ch) => { + searchinput.push(ch); + selected = 0; + } + KeyEvent::Backspace => { + searchinput.pop(); + selected = 0; + } + _ => { + // println!("OTHER InputEvent: {:?}", k); + } + }, + _ => {} + } + } + if num_lines > 0 { + cursor.move_up(num_lines as u16); } } - if num_lines > 0 { - cursor.move_up(num_lines as u16); - } + let (_x, y) = cursor.pos(); + let _ = cursor.goto(0, y - 1); + let _ = cursor.show(); + let _ = RawScreen::disable_raw_mode(); } - let (_x, y) = cursor.pos(); - let _ = cursor.goto(0, y - 1); - let _ = cursor.show(); - let _ = RawScreen::disable_raw_mode(); + terminal().clear(ClearType::FromCursorDown).unwrap(); } - terminal().clear(ClearType::FromCursorDown).unwrap(); - match state { State::Selected(line) => SelectionResult::Selected(line), State::Edit(line) => SelectionResult::Edit(line), @@ -132,6 +135,7 @@ pub fn fuzzy_search(searchstr: &str, lines: &Vec<&str>, max_results: usize) -> V results } +#[cfg(feature = "crossterm")] fn highlight(textmatch: &Match, normal: Style, highlighted: Style) -> Vec { let text = &textmatch.text; let mut ansi_strings = vec![]; @@ -147,6 +151,7 @@ fn highlight(textmatch: &Match, normal: Style, highlighted: Style) -> Vec, selected: usize) { let terminal = terminal(); let size = terminal.terminal_size(); diff --git a/src/shell/filesystem_shell.rs b/src/shell/filesystem_shell.rs index d28047745..3c1ae79ea 100644 --- a/src/shell/filesystem_shell.rs +++ b/src/shell/filesystem_shell.rs @@ -187,6 +187,14 @@ impl Shell for FilesystemShell { } else { let path = PathBuf::from(self.path()); + if target.exists() && !target.is_dir() { + return Err(ShellError::labeled_error( + "Can not change to directory", + "is not a directory", + v.tag().clone(), + )); + } + match dunce::canonicalize(path.join(&target)) { Ok(p) => p, Err(_) => { diff --git a/tests/command_cd_tests.rs b/tests/command_cd_tests.rs index e0cc60867..8b6592c94 100644 --- a/tests/command_cd_tests.rs +++ b/tests/command_cd_tests.rs @@ -120,6 +120,21 @@ fn filesystem_change_to_a_directory_containing_spaces() { }) } +#[test] +fn filesystem_not_a_directory() { + Playground::setup("cd_test_8", |dirs, sandbox| { + sandbox.with_files(vec![EmptyFile("ferris_did_it.txt")]); + + let actual = nu_error!( + cwd: dirs.test(), + "cd ferris_did_it.txt" + ); + + assert!(actual.contains("ferris_did_it.txt")); + assert!(actual.contains("is not a directory")); + }) +} + #[test] fn filesystem_directory_not_found() { let actual = nu_error!( @@ -133,7 +148,7 @@ fn filesystem_directory_not_found() { #[test] fn valuesystem_change_from_current_path_using_relative_path() { - Playground::setup("cd_test_8", |dirs, sandbox| { + Playground::setup("cd_test_9", |dirs, sandbox| { sandbox.with_files(vec![FileWithContent( "sample.toml", r#" @@ -164,7 +179,7 @@ fn valuesystem_change_from_current_path_using_relative_path() { #[test] fn valuesystem_change_from_current_path_using_absolute_path() { - Playground::setup("cd_test_9", |dirs, sandbox| { + Playground::setup("cd_test_10", |dirs, sandbox| { sandbox.with_files(vec![FileWithContent( "sample.toml", r#" @@ -198,7 +213,7 @@ fn valuesystem_change_from_current_path_using_absolute_path() { #[test] fn valuesystem_switch_back_to_previous_working_path() { - Playground::setup("cd_test_10", |dirs, sandbox| { + Playground::setup("cd_test_11", |dirs, sandbox| { sandbox.with_files(vec![FileWithContent( "sample.toml", r#" @@ -234,7 +249,7 @@ fn valuesystem_switch_back_to_previous_working_path() { #[test] fn valuesystem_change_from_current_path_using_relative_path_and_dash() { - Playground::setup("cd_test_11", |dirs, sandbox| { + Playground::setup("cd_test_12", |dirs, sandbox| { sandbox .with_files(vec![FileWithContent( "sample.toml", @@ -268,7 +283,7 @@ fn valuesystem_change_from_current_path_using_relative_path_and_dash() { #[test] fn valuesystem_change_current_path_to_parent_path() { - Playground::setup("cd_test_12", |dirs, sandbox| { + Playground::setup("cd_test_13", |dirs, sandbox| { sandbox .with_files(vec![FileWithContent( "sample.toml", @@ -295,7 +310,7 @@ fn valuesystem_change_current_path_to_parent_path() { #[test] fn valuesystem_change_to_home_directory() { - Playground::setup("cd_test_13", |dirs, sandbox| { + Playground::setup("cd_test_14", |dirs, sandbox| { sandbox.with_files(vec![FileWithContent( "sample.toml", r#" @@ -321,7 +336,7 @@ fn valuesystem_change_to_home_directory() { #[test] fn valuesystem_change_to_a_path_containing_spaces() { - Playground::setup("cd_test_14", |dirs, sandbox| { + Playground::setup("cd_test_15", |dirs, sandbox| { sandbox.with_files(vec![FileWithContent( "sample.toml", r#"