diff --git a/.cargo/config b/.cargo/config index e82ae86..bcfce47 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,4 +1,14 @@ # Why dynamic linking? # See https://github.com/sayanarijit/xplr/issues/309 + [target.x86_64-unknown-linux-gnu] rustflags = ["-C", "link-args=-rdynamic"] + +[target.aarch64-unknown-linux-gnu] +rustflags = ["-C", "linker=aarch64-linux-gnu-gcc", "-C", "link-args=-rdynamic"] + +[target.aarch64-linux-android] +rustflags = ["-C", "linker=aarch64-linux-android-clang", "-C", "link-args=-rdynamic", "-C", "default-linker-libraries"] + +[target.arm-unknown-linux-gnueabihf] +rustflags = ["-C", "linker=arm-linux-gnueabihf-gcc", "-C", "link-args=-rdynamic"] diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ca26841..e5d37d3 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -12,71 +12,74 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: - - macos-latest - - ubuntu-latest - - ubuntu-20.04 + build: + - macos + - macos-aarch64 + - linux + - linux-musl + - linux-aarch64 + - linux-arm rust: [stable] include: # See the list: https://github.com/cross-rs/cross - - os: macos-latest - artifact_prefix: macos + - build: macos + os: macos-latest target: x86_64-apple-darwin - binary_postfix: "" - - os: ubuntu-latest - artifact_prefix: linux + - build: macos-aarch64 + os: macos-latest + target: aarch64-apple-darwin + + - build: linux + os: ubuntu-latest target: x86_64-unknown-linux-gnu - binary_postfix: "" - - os: ubuntu-20.04 - artifact_prefix: linux-musl + - build: linux-musl + os: ubuntu-latest target: x86_64-unknown-linux-musl - binary_postfix: "" - # Will see later + - build: linux-aarch64 + os: ubuntu-latest + target: aarch64-unknown-linux-gnu - # - os: ubuntu-latest - # artifact_prefix: x86_64-android - # target: x86_64-linux-android - # binary_postfix: '' - # - # - os: ubuntu-latest - # artifact_prefix: aarch64-android - # target: aarch64-linux-android - # binary_postfix: '' + - build: linux-arm + os: ubuntu-latest + target: arm-unknown-linux-gnueabihf steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Installing Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.rust }} target: ${{ matrix.target }} - override: true - name: Installing needed macOS dependencies if: matrix.os == 'macos-latest' run: brew install openssl@1.1 - name: Installing needed Ubuntu dependencies - if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' + if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update --fix-missing - sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev + sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev gcc pkg-config curl git make ca-certificates + + - if: matrix.build == 'linux-musl' + run: sudo apt-get install -y musl-tools + + - if: matrix.build == 'linux-aarch64' + run: sudo apt-get install -y gcc-aarch64-linux-gnu - - name: Checking out sources - uses: actions/checkout@v1 + - if: matrix.build == 'linux-arm' + run: | + sudo apt-get install -y gcc-multilib + sudo apt-get install -y gcc-arm-linux-gnueabihf + sudo ln -s /usr/include/asm-generic/ /usr/include/asm - name: Running cargo build - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: build - toolchain: ${{ matrix.rust }} - args: --locked --release --target ${{ matrix.target }} + run: cargo build --locked --release --target ${{ matrix.target }} - name: Install gpg secret key run: | @@ -87,9 +90,9 @@ jobs: shell: bash run: | cd target/${{ matrix.target }}/release - BINARY_NAME=xplr${{ matrix.binary_postfix }} + BINARY_NAME=xplr strip $BINARY_NAME - RELEASE_NAME=xplr-${{ matrix.artifact_prefix }} + RELEASE_NAME=xplr-${{ matrix.build }} tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME shasum -a 256 $RELEASE_NAME.tar.gz > $RELEASE_NAME.sha256 cat <(echo "${{ secrets.GPG_PASS }}") | gpg --pinentry-mode loopback --passphrase-fd 0 --detach-sign --armor $RELEASE_NAME.tar.gz @@ -98,9 +101,9 @@ jobs: uses: softprops/action-gh-release@v1 with: files: | - target/${{ matrix.target }}/release/xplr-${{ matrix.artifact_prefix }}.tar.gz - target/${{ matrix.target }}/release/xplr-${{ matrix.artifact_prefix }}.sha256 - target/${{ matrix.target }}/release/xplr-${{ matrix.artifact_prefix }}.tar.gz.asc + target/${{ matrix.target }}/release/xplr-${{ matrix.build }}.tar.gz + target/${{ matrix.target }}/release/xplr-${{ matrix.build }}.sha256 + target/${{ matrix.target }}/release/xplr-${{ matrix.build }}.tar.gz.asc env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -108,7 +111,7 @@ jobs: name: Publishing GPG signature runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install gpg secret key run: | cat <(echo -e "${{ secrets.GPG_SECRET }}") | gpg --batch --import @@ -133,20 +136,16 @@ jobs: name: Publishing to Cargo runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: toolchain: stable - override: true - run: | sudo apt-get update --fix-missing sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev - - uses: actions-rs/cargo@v1 - with: - command: publish - args: --allow-dirty + - run: cargo publish --allow-dirty env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_API_KEY }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ebe8ed..9c69dc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,130 +11,134 @@ jobs: name: Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable with: toolchain: stable - profile: minimal - override: true - - uses: actions-rs/cargo@v1 + - run: cargo check + + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: rustfmt + - run: cargo fmt --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: clippy + - run: cargo clippy -- -D warnings + + spellcheck: + name: Spellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: codespell-project/actions-codespell@v1 with: - command: check + ignore_words_file: .codespellignore test: name: Test Suite runs-on: ${{ matrix.os }} + needs: + - check + - fmt + - clippy + - spellcheck strategy: matrix: - os: - - macos-latest - - ubuntu-latest - - ubuntu-20.04 + build: + - macos + - macos-aarch64 + - linux + - linux-musl + - linux-aarch64 + - linux-arm rust: [stable] include: - - os: macos-latest - artifact_prefix: macos + # See the list: https://github.com/cross-rs/cross + + - build: macos + os: macos-latest target: x86_64-apple-darwin - binary_postfix: "" - - os: ubuntu-latest - artifact_prefix: linux + + - build: macos-aarch64 + os: macos-latest + target: aarch64-apple-darwin + + - build: linux + os: ubuntu-latest target: x86_64-unknown-linux-gnu - binary_postfix: "" - - os: ubuntu-20.04 - artifact_prefix: linux-musl + + - build: linux-musl + os: ubuntu-latest target: x86_64-unknown-linux-musl - binary_postfix: "" + + - build: linux-aarch64 + os: ubuntu-latest + target: aarch64-unknown-linux-gnu + + - build: linux-arm + os: ubuntu-latest + target: arm-unknown-linux-gnueabihf env: RUST_BACKTRACE: full steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Installing Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.rust }} target: ${{ matrix.target }} - override: true - name: Installing needed macOS dependencies if: matrix.os == 'macos-latest' run: brew install openssl@1.1 - name: Installing needed Ubuntu dependencies - if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' + if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update --fix-missing - sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev + sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev gcc pkg-config curl git make ca-certificates - - name: Build - uses: actions-rs/cargo@v1 - with: - command: build - toolchain: ${{ matrix.rust }} - args: --target ${{ matrix.target }} + - if: matrix.build == 'linux-musl' + run: sudo apt-get install -y musl-tools - - name: Test - uses: actions-rs/cargo@v1 - with: - command: test - toolchain: ${{ matrix.rust }} - args: --target ${{ matrix.target }} + - if: matrix.build == 'linux-aarch64' + run: sudo apt-get install -y gcc-aarch64-linux-gnu + + - if: matrix.build == 'linux-arm' + run: | + sudo apt-get install -y gcc-multilib + sudo apt-get install -y gcc-arm-linux-gnueabihf + sudo ln -s /usr/include/asm-generic/ /usr/include/asm + + - run: cargo build --target ${{ matrix.target }} + - if: matrix.build == 'macos' || matrix.build == 'linux' + run: cargo test --target ${{ matrix.target }} # bench: # name: Benchmarks # runs-on: ubuntu-latest # steps: - # - uses: actions/checkout@v2 - # - uses: actions-rs/toolchain@v1 + # - uses: actions/checkout@v3 + # - uses: dtolnay/rust-toolchain@stable # with: # toolchain: stable - # profile: minimal - # override: true # # These dependencies are required for `clipboard` # - run: sudo apt-get install -y -qq libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev - # - uses: actions-rs/cargo@v1 - # with: - # command: bench - - fmt: - name: Rustfmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - clippy: - name: Clippy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - components: clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings - - spellcheck: - name: Spellcheck - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: codespell-project/actions-codespell@v1 - with: - ignore_words_file: .codespellignore + # - run: cargo bench diff --git a/.gitignore b/.gitignore index 863591b..555f146 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ book/ # direnv .direnv/ + +# nix +result diff --git a/Cargo.lock b/Cargo.lock index 89ceb85..73fbf63 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,24 +3,19 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.6" +name = "aho-corasick" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" dependencies = [ - "getrandom", - "once_cell", - "version_check", + "memchr", ] [[package]] -name = "aho-corasick" -version = "1.0.1" +name = "android-tzdata" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" -dependencies = [ - "memchr", -] +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] name = "android_system_properties" @@ -39,9 +34,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "ansi-to-tui" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f3d156989cd98fb225b1a83e82e133e95a151774a420c884f6a65c5f6fb1ee2" +checksum = "0b0e348dcd256ba06d44d5deabc88a7c0e80ee7303158253ca069bcd9e9b7f57" dependencies = [ "nom", "ratatui", @@ -50,30 +45,30 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "assert_cmd" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d6b683edf8d1119fe420a94f8a7e389239666aa72e65495d91c00462510151" +checksum = "88903cb14723e4d4003335bb7f8a14f27691649105346a0f0957466c096adfe6" dependencies = [ "anstyle", - "bstr 1.5.0", + "bstr 1.6.0", "doc-comment", "predicates", "predicates-core", @@ -81,17 +76,6 @@ dependencies = [ "wait-timeout", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -110,6 +94,15 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +dependencies = [ + "serde", +] + [[package]] name = "bstr" version = "0.2.17" @@ -121,21 +114,20 @@ dependencies = [ [[package]] name = "bstr" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", - "once_cell", "regex-automata", "serde", ] [[package]] name = "bumpalo" -version = "3.12.2" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "cassowary" @@ -151,9 +143,12 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -163,13 +158,13 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "time 0.1.45", "wasm-bindgen", @@ -205,25 +200,29 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.25" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" dependencies = [ - "bitflags", - "clap_lex", - "indexmap", - "textwrap", + "clap_builder", ] [[package]] -name = "clap_lex" -version = "0.2.4" +name = "clap_builder" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" dependencies = [ - "os_str_bytes", + "anstyle", + "clap_lex", ] +[[package]] +name = "clap_lex" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + [[package]] name = "core-foundation-sys" version = "0.8.4" @@ -232,19 +231,19 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "criterion" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" dependencies = [ "anes", - "atty", "cast", "ciborium", "clap", "criterion-plot", + "is-terminal", "itertools", - "lazy_static", "num-traits", + "once_cell", "oorandom", "plotters", "rayon", @@ -303,14 +302,14 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", + "memoffset 0.9.0", "scopeguard", ] @@ -326,9 +325,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -339,7 +338,23 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13" dependencies = [ - "bitflags", + "bitflags 1.3.2", + "crossterm_winapi", + "libc", + "mio", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" +dependencies = [ + "bitflags 2.3.3", "crossterm_winapi", "libc", "mio", @@ -351,9 +366,9 @@ dependencies = [ [[package]] name = "crossterm_winapi" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" dependencies = [ "winapi", ] @@ -403,6 +418,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "deranged" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +dependencies = [ + "serde", +] + [[package]] name = "derive_builder" version = "0.11.2" @@ -469,19 +493,46 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2b0c2380453a92ea8b6c8e5f64ecaafccddde8ceab55ff7a8ac1029f894569" +checksum = "da96524cc884f6558f1769b6c46686af2fe8e8b4cd253bd5a3cdba8181b8e070" dependencies = [ "serde", ] +[[package]] +name = "errno" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "fnv" version = "1.0.7" @@ -504,14 +555,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" dependencies = [ "libc", - "windows-targets 0.48.0", + "windows-targets", ] [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -526,30 +577,15 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash", -] +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "home" @@ -557,7 +593,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -571,9 +607,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -600,15 +636,32 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.9.3" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ - "autocfg", + "equivalent", "hashbrown", "serde", ] +[[package]] +name = "indoc" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c785eefb63ebd0e33416dfcb8d6da0bf27ce752843a45632a67bf10d4d4b5c4" + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi", + "rustix", + "windows-sys", +] + [[package]] name = "itertools" version = "0.10.5" @@ -620,15 +673,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jf" -version = "0.3.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379d1f8869705532e4cb467908eccbf83e433b0ac4bb2618cf6217c8303a2798" +checksum = "216281840917ca494664f581363a9c9bdeecaf7d9d7a229cd51d280916a3694f" dependencies = [ "serde_json", "serde_yaml", @@ -636,9 +689,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -651,9 +704,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libm" @@ -661,11 +714,17 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" + [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -673,18 +732,15 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "lscolors" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a9df1d1fb6d9e92fa043e9eb9a3ecf6892c7b542bae5137cd1e419e40aa8bf" +checksum = "bf7015a04103ad78abb77e4b79ed151e767922d1cfde5f62640471c629a2320d" dependencies = [ "nu-ansi-term", ] @@ -700,11 +756,12 @@ dependencies = [ [[package]] name = "luajit-src" -version = "210.4.5+resty2cf5186" +version = "210.4.7+resty107baaf" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b7992a40e602786272d84c6f2beca44a588ededcfd57b48ec6f82008a7cb97" +checksum = "ca76a3752fc130e5dabef71792f4f7095babb72f7c85860c7830eb746ad8bf31" dependencies = [ "cc", + "which", ] [[package]] @@ -724,9 +781,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -755,14 +812,14 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] @@ -795,7 +852,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", ] @@ -807,7 +864,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" dependencies = [ "autocfg", - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.6.5", @@ -826,39 +883,29 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df031e117bca634c262e9bd3173776844b6c17a90b3741c9163663b4385af76" -dependencies = [ - "windows-sys 0.45.0", -] - -[[package]] -name = "num-integer" -version = "0.1.45" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68" dependencies = [ - "autocfg", - "num-traits", + "windows-sys", ] [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] @@ -873,9 +920,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "oorandom" @@ -883,12 +930,6 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" -[[package]] -name = "os_str_bytes" -version = "6.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" - [[package]] name = "parking_lot" version = "0.12.1" @@ -901,17 +942,23 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.45.0", + "windows-targets", ] +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + [[package]] name = "path-absolutize" version = "3.1.0" @@ -944,9 +991,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plotters" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" dependencies = [ "num-traits", "plotters-backend", @@ -957,15 +1004,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" [[package]] name = "plotters-svg" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" dependencies = [ "plotters-backend", ] @@ -1000,31 +1047,33 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.27" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] [[package]] name = "ratatui" -version = "0.20.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcc0d032bccba900ee32151ec0265667535c230169f5a011154cdcd984e16829" +checksum = "8285baa38bdc9f879d92c0e37cb562ef38aa3aeefca22b3200186bc39242d3d5" dependencies = [ - "bitflags", + "bitflags 2.3.3", "cassowary", - "crossterm", + "crossterm 0.26.1", + "indoc", + "paste", "serde", "unicode-segmentation", "unicode-width", @@ -1058,7 +1107,16 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", ] [[package]] @@ -1068,32 +1126,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.8.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" dependencies = [ "aho-corasick", "memchr", + "regex-automata", "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.1.10" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] [[package]] name = "regex-syntax" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "rustc-hash" @@ -1101,17 +1165,30 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustix" +version = "0.38.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "172891ebdceb05aa0005f533a6cbfca599ddd7d966f6f5d4d9b2e70478e70399" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -1124,35 +1201,35 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" dependencies = [ "itoa", "ryu", @@ -1161,9 +1238,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.21" +version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" +checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ "indexmap", "itoa", @@ -1174,9 +1251,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -1209,7 +1286,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d28de0a6cb2cdd83a076f1de9d965b973ae08b244df1aa70b432946dda0f32" dependencies = [ "beef", - "bitflags", + "bitflags 1.3.2", "chrono", "crossbeam", "defer-drop", @@ -1220,7 +1297,7 @@ dependencies = [ "nix 0.25.1", "rayon", "regex", - "time 0.3.21", + "time 0.3.25", "timer", "tuikit", "unicode-width", @@ -1229,9 +1306,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "smawk" @@ -1268,9 +1345,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ "proc-macro2", "quote", @@ -1307,22 +1384,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -1348,10 +1425,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" dependencies = [ + "deranged", "itoa", "libc", "num_threads", @@ -1368,9 +1446,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" dependencies = [ "time-core", ] @@ -1396,11 +1474,11 @@ dependencies = [ [[package]] name = "tui-input" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40419b12b152aaa1a295741903c9b6253e66ef07e0630e2e2503c736f280fdde" +checksum = "b3e785f863a3af4c800a2a669d0b64c879b538738e352607e2624d03f868dc01" dependencies = [ - "crossterm", + "crossterm 0.27.0", "serde", "unicode-width", ] @@ -1411,7 +1489,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e19c6ab038babee3d50c8c12ff8b910bdb2196f62278776422f50390d8e53d8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "lazy_static", "log", "nix 0.24.3", @@ -1430,19 +1508,15 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-linebreak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5faade31a542b8b35855fff6e8def199853b2da8da256da52f52f1316ee3137" -dependencies = [ - "hashbrown", - "regex", -] +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-segmentation" @@ -1464,9 +1538,9 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "unsafe-libyaml" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" [[package]] name = "utf8parse" @@ -1482,9 +1556,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vte" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aae21c12ad2ec2d168c236f369c38ff332bc1134f7246350dca641437365045" +checksum = "f5022b5fbf9407086c180e9557be968742d839e68346af7792b8592489732197" dependencies = [ "arrayvec", "utf8parse", @@ -1534,9 +1608,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1544,24 +1618,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1569,28 +1643,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -1644,16 +1718,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", + "windows-targets", ] [[package]] @@ -1662,117 +1727,60 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.0" @@ -1781,22 +1789,19 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "xdg" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688597db5a750e9cad4511cb94729a078e274308099a0382b5b8203bbc767fee" -dependencies = [ - "home", -] +checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" [[package]] name = "xplr" -version = "0.21.2" +version = "0.21.3" dependencies = [ "ansi-to-tui", "anyhow", "assert_cmd", "criterion", - "crossterm", + "crossterm 0.27.0", "gethostname", "home", "humansize", @@ -1818,7 +1823,7 @@ dependencies = [ "skim", "snailquote", "textwrap", - "time 0.3.21", + "time 0.3.25", "tui-input", "which", "xdg", diff --git a/Cargo.toml b/Cargo.toml index 101f350..48bd3e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ path = './benches/criterion.rs' [package] name = 'xplr' -version = '0.21.2' +version = '0.21.3' authors = ['Arijit Basu '] edition = '2021' description = 'A hackable, minimal, fast TUI file explorer' @@ -22,29 +22,29 @@ categories = ['command-line-interface', 'command-line-utilities'] include = ['src/**/*', 'docs/en/src/**/*', 'LICENSE', 'README.md'] [dependencies] -libc = "0.2.144" +libc = "0.2.147" humansize = "2.1.3" natord = "1.0.9" -anyhow = "1.0.71" -serde_yaml = "0.9.21" -crossterm = { version = "0.26.1", features = [], default-features = false } -ansi-to-tui = "3.0.0" -regex = "1.8.1" +anyhow = "1.0.72" +serde_yaml = "0.9.25" +crossterm = { version = "0.27.0", features = [], default-features = false } +ansi-to-tui = "3.1.0" +regex = "1.9.3" gethostname = "0.4.3" -serde_json = "1.0.96" +serde_json = "1.0.104" path-absolutize = "3.1.0" which = "4.4.0" -nu-ansi-term = "0.47.0" +nu-ansi-term = "0.49.0" textwrap = "0.16" snailquote = "0.3.1" skim = { version = "0.10.4", default-features = false } -time = { version = "0.3.21", features = ["serde", "local-offset", "formatting", "macros"] } -jf = "0.3.1" -xdg = "2.5.0" +time = { version = "0.3.25", features = ["serde", "local-offset", "formatting", "macros"] } +jf = "0.6.2" +xdg = "2.5.2" home = "0.5.5" [dependencies.lscolors] -version = "0.14.0" +version = "0.15.0" default-features = false features = ["nu-ansi-term"] @@ -57,18 +57,18 @@ version = "2.0.4" default-features = false [dependencies.tui] -version = "0.20.1" +version = "0.22.0" default-features = false features = ['crossterm', 'serde'] package = 'ratatui' [dependencies.serde] -version = "1.0.163" +version = "1.0.183" features = [] default-features = false [dependencies.indexmap] -version = "1.9.3" +version = "2.0.0" features = ['serde'] [dependencies.mlua] @@ -76,16 +76,17 @@ version = "0.8.9" features = ['luajit', 'vendored', 'serialize', 'send'] [dependencies.tui-input] -version = "0.7.0" +version = "0.8.0" features = ['serde'] [dev-dependencies] -criterion = "0.4.0" -assert_cmd = "2.0.11" +criterion = "0.5.1" +assert_cmd = "2.0.12" [profile.release] lto = true codegen-units = 1 panic = 'abort' +strip = true [features] diff --git a/README.md b/README.md index fccbb7f..2d42ca6 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,8 @@ integration][15], enabling you to achieve insane terminal productivity. - [[Article] What is a TUI file explorer & why would you need one? ~ xplr.stck.me](https://xplr.stck.me/post/25252/What-is-a-TUI-file-explorer-why-would-you-need-one) +- [[Article] FOSSPicks - Linux Magazine](https://www.linux-magazine.com/Issues/2022/258/FOSSPicks/(offset)/6) + ## Packaging Package maintainers please refer to the [RELEASE.md](./RELEASE.md). diff --git a/docs/en/src/configuration.md b/docs/en/src/configuration.md index 420d388..ef84ab0 100644 --- a/docs/en/src/configuration.md +++ b/docs/en/src/configuration.md @@ -131,6 +131,14 @@ return { { LogSuccess = "Switched layout" }, { CallLuaSilently = "custom.some_plugin_with_hooks.on_layout_switch" }, } + + -- Add messages to send when the selection changes + -- + -- Type: list of [Message](https://xplr.dev/en/message#message)s + on_selection_change = { + { LogSuccess = "Selection changed" }, + { CallLuaSilently = "custom.some_plugin_with_hooks.on_selection_change" }, + } } ``` diff --git a/docs/en/src/general-config.md b/docs/en/src/general-config.md index 8b09e11..75fa861 100644 --- a/docs/en/src/general-config.md +++ b/docs/en/src/general-config.md @@ -587,12 +587,16 @@ Type: nullable list of [Node Sorter](https://xplr.dev/en/sorting#node-sorter-app #### xplr.config.general.initial_mode The name of one of the modes to use when xplr loads. +This isn't the default mode. To modify the default mode, overwrite +[xplr.config.modes.builtin.default](https://xplr.dev/en/modes#xplrconfigmodesbuiltindefault). Type: nullable string #### xplr.config.general.initial_layout The name of one of the layouts to use when xplr loads. +This isn't the default layout. To modify the default layout, overwrite +[xplr.config.layouts.builtin.default](https://xplr.dev/en/layouts#xplrconfiglayoutsbuiltindefault). Type: nullable string diff --git a/docs/en/src/install.md b/docs/en/src/install.md index 40f449c..c32f3aa 100644 --- a/docs/en/src/install.md +++ b/docs/en/src/install.md @@ -198,44 +198,20 @@ sudo cp target/release/xplr /usr/local/bin/ ## Android -### [Termux][23] +### [Termux][24] -[![xplr-termuxfd3c398d3cf4bcbc.md.jpg][24]][25] - -> Please note that xplr isn't heavily tested on Termux, hence things might -> need a little tweaking and fixing for a smooth usage experience. - -- Install build dependencies - - ```bash - pkg install rustc cargo make - ``` - -- Install `xplr` - - ```bash - cargo install --locked --force xplr - ``` - -- Setup storage - - ```bash - termux-setup-storage - ``` - -- Setup config and runtime dir +```bash +pkg install rust make binutils +cargo install --locked xplr - ```bash - export XDG_CONFIG_HOME="$PWD/storage/.config" - export XDG_RUNTIME_DIR="$PWD/storage/run" +# Run +~/.cargo/bin/xplr +``` - mkdir -p "$XDG_CONFIG_HOME" "$XDG_RUNTIME_DIR" - ``` +> Please note that xplr isn't heavily tested on Termux, hence things might need +> a little tweaking and fixing for a smooth user experience. -- Run - ```bash - ~/.cargo/bin/xplr - ``` +![termux demo][23] [1]: #direct-download [2]: #from-cratesio @@ -259,8 +235,8 @@ sudo cp target/release/xplr /usr/local/bin/ [20]: https://gcc.gnu.org/ [21]: https://www.gnu.org/software/make/ [22]: https://git-scm.com/ -[23]: https://termux.com/ -[24]: https://s3.gifyu.com/images/xplr-termuxfd3c398d3cf4bcbc.md.jpg +[23]: https://github.com/sayanarijit/xplr/assets/11632726/3b61e8c8-76f0-48e8-8734-50e9e7e495b7 +[24]: https://termux.dev/ [25]: https://gifyu.com/image/tF2D [26]: https://github.com/sayanarijit/xplr/releases/latest/download/xplr-linux-musl.tar.gz [27]: https://pkgs.alpinelinux.org/packages?name=xplr diff --git a/docs/en/src/layout.md b/docs/en/src/layout.md index 2a74878..ec603a8 100644 --- a/docs/en/src/layout.md +++ b/docs/en/src/layout.md @@ -2,15 +2,13 @@ #### Example: Defining Custom Layout -[![layout.png][23]][24] - ```lua xplr.config.layouts.builtin.default = { Horizontal = { config = { margin = 1, - horizontal_margin = 2, - vertical_margin = 3, + horizontal_margin = 1, + vertical_margin = 1, constraints = { { Percentage = 50 }, { Percentage = 50 }, @@ -24,6 +22,21 @@ xplr.config.layouts.builtin.default = { } ``` +Result: + +``` + ╭ /home ─────────────╮╭ Help [default] ────╮ + │ ╭─── path ││. show hidden │ + │ ├▸[ð Desktop/] ││/ search │ + │ ├ ð Documents/ ││: action │ + │ ├ ð Downloads/ ││? global help │ + │ ├ ð GitHub/ ││G go to bottom │ + │ ├ ð Music/ ││V select/unselect│ + │ ├ ð Pictures/ ││ctrl duplicate as │ + │ ├ ð Public/ ││ctrl next visit │ + ╰────────────────────╯╰────────────────────╯ +``` + A layout is a [sum type][56] can be one of the following: - [Nothing][8] @@ -86,7 +99,7 @@ Type: { Static = [Custom Panel][27] } This is a custom layout to render dynamic content using a function defined in [xplr.fn][28] that takes [Content Renderer Argument][36] and returns [Custom Panel][27]. -Type: { Dynamic = [Content Renderer][35] } +Type: { Dynamic = "[Content Renderer][35]" } ### Horizontal @@ -97,7 +110,7 @@ It contains the following information: - [config][15] - [splits][17] -Type: { Horizontal = { config = [config][15], splits = [splits][17] } +Type: { Vertical = { config = [Layout Config][15], splits = { [Layout][17], ... } } ### Vertical @@ -108,7 +121,7 @@ It contains the following information: - [config][15] - [splits][17] -Type: { Vertical = { config = [config][15], splits = [splits][17] } +Type: { Vertical = { config = [Layout Config][15], splits = { [Layout][17], ... } } ## Layout Config @@ -200,6 +213,16 @@ xplr.config.layouts.builtin.default = { } ``` +Result: + +``` +╭ custom title ────────╮ +│custom body │ +│ │ +│ │ +╰──────────────────────╯ +``` + #### Example: Render a custom dynamic paragraph ```lua @@ -215,6 +238,23 @@ xplr.fn.custom.render_layout = function(ctx) end ``` +Result: + +``` +╭/home/sayanarijit───────────────────────────╮ +│mime_essence: inode/directory │ +│relative_path: Desktop │ +│is_symlink: false │ +│is_readonly: false │ +│parent: /home/sayanarijit │ +│absolute_path: /home/sayanarijit/Desktop │ +│is_broken: false │ +│created: 1668087850396758714 │ +│size: 4096 │ +│gid: 100 │ +╰────────────────────────────────────────────╯ +``` + ### CustomList A list to render. It contains the following fields: @@ -235,6 +275,17 @@ xplr.config.layouts.builtin.default = { } ``` +Result: + +``` +╭ custom title ─────────────╮ +│1 │ +│2 │ +│3 │ +│ │ +╰───────────────────────────╯ +``` + #### Example: Render a custom dynamic list ```lua @@ -254,6 +305,18 @@ xplr.fn.custom.render_layout = function(ctx) end ``` +Result: + +``` +╭/home/sayanarijit──────────╮ +│Desktop │ +│0.21.2 │ +│17336 │ +│ │ +│ │ +╰───────────────────────────╯ +``` + ## CustomTable A custom table to render. It contains the following fields: @@ -283,6 +346,18 @@ xplr.config.layouts.builtin.default = { } ``` +Result: + +``` +╭ custom title ────────────────────╮ +│a b │ +│c d │ +│ │ +│ │ +│ │ +╰──────────────────────────────────╯ +``` + #### Example: Render a custom dynamic table ```lua @@ -309,6 +384,23 @@ xplr.fn.custom.render_layout = function(ctx) end ``` +Result: + +``` +╭/home/sayanarijit───────────────────────────╮ +│ │ +│Layout height 12 │ +│Layout width 46 │ +│ │ +│Screen height 12 │ +│Screen width 46 │ +│ │ +│ │ +│ │ +│ │ +╰────────────────────────────────────────────╯ +``` + ### CustomLayout A whole custom layout to render. It doesn't make sense to use it as a @@ -347,6 +439,40 @@ xplr.fn.custom.render_layout = function(ctx) end ``` +Result: + +``` +╭─────────────────────╮╭─────────────────────╮ +│Try your luck... ││Press ctrl-r │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +╰─────────────────────╯╰─────────────────────╯ +``` + +Or + +``` +╭────────────────────────────────────────────╮ +│Try your luck... │ +│ │ +│ │ +│ │ +╰────────────────────────────────────────────╯ +╭────────────────────────────────────────────╮ +│Press ctrl-r │ +│ │ +│ │ +│ │ +╰────────────────────────────────────────────╯ +``` + ## Panel UI Config It contains the following optional fields: @@ -429,8 +555,6 @@ Hence, only the following fields are available. [20]: #vertical_margin [21]: #constraints [22]: #constraint -[23]: https://s6.gifyu.com/images/layout.png -[24]: https://gifyu.com/image/1X38 [25]: #static [26]: #dynamic [27]: #custom-panel diff --git a/docs/en/src/layouts.md b/docs/en/src/layouts.md index 1650da6..9ee0635 100644 --- a/docs/en/src/layouts.md +++ b/docs/en/src/layouts.md @@ -12,15 +12,13 @@ You can add new panels in `xplr.config.layouts.custom`. ##### Example: Defining Custom Layout -![demo](https://s6.gifyu.com/images/layout.png) - ```lua xplr.config.layouts.builtin.default = { Horizontal = { config = { margin = 1, - horizontal_margin = 2, - vertical_margin = 3, + horizontal_margin = 1, + vertical_margin = 1, constraints = { { Percentage = 50 }, { Percentage = 50 }, @@ -34,6 +32,21 @@ xplr.config.layouts.builtin.default = { } ``` +Result: + +``` +╭ /home ─────────────╮╭ Help [default] ────╮ +│ ╭─── path ││. show hidden │ +│ ├▸[ð Desktop/] ││/ search │ +│ ├ ð Documents/ ││: action │ +│ ├ ð Downloads/ ││? global help │ +│ ├ ð GitHub/ ││G go to bottom │ +│ ├ ð Music/ ││V select/unselect│ +│ ├ ð Pictures/ ││ctrl duplicate as │ +│ ├ ð Public/ ││ctrl next visit │ +╰────────────────────╯╰────────────────────╯ +``` + #### xplr.config.layouts.builtin.default The default layout diff --git a/docs/en/src/sum-type.md b/docs/en/src/sum-type.md index 777aa65..26e93dd 100644 --- a/docs/en/src/sum-type.md +++ b/docs/en/src/sum-type.md @@ -29,23 +29,23 @@ them, but only a few modern programming languages allow nesting other types into a sum type. ```rust -enum Result { - Ok, - Err, +enum Color { + Red, + Green, } ``` -Here, `Result` can be one of two possible set of values: `Ok` and `Err`, just -like `boolean`, but unlike `boolean`, being tagged allows `Result` to have more +Here, `Color` can be one of two possible set of values: `Red` and `Green`, just +like `boolean`, but unlike `boolean`, being tagged allows `Color` to have more than two variants if required, by changing the definition. e.g. ```rust -enum Result { - Ok, - Err, - Pending, +enum Color { + Red, + Green, + Blue, } ``` @@ -53,35 +53,39 @@ We'd document it here as: > Result is a sum type that can be one of the following: > -> - "Ok" -> - "Err" -> - "Pending" +> - "Red" +> - "Green" +> - "Blue" But some languages (like Rust, Haskell, Elm etc.) go even further, allowing us to associate each branch of the enum with further nested types like: ```rust -enum Result { - Ok(bool), - Err(Error), - Pending, +enum Layout { + Table, + HelpMenu, + Horizontal { + config: LayoutConfig, // A product type (similar to class/struct) + splits: Vec // A list of "Layout"s (i.e. list of sum types) + }, } ``` -Here, as we can see, unlike the first example, some of `Result`'s possible -variants can have further nested types associated with them. Note that `Error` -here can be either a sum type (e.g. enum), or a product type (e.g. -class/struct), but whatever it is, it will only exist when `Result` is `Err`. +Here, as we can see, unlike the first example, some of `Layout`'s possible +variants can have further nested types associated with them. Note that +`Horizontal` here can have a sum type (e.g. enum), or a product type (e.g. +class/struct), or both (any number of them actually) nested in it. But the +nested values will only exist when `Layout` is `Horizontal`. We'd document it here as: -> Result is a sum type that can be one of the following: +> Layout is a sum type that can be one of the following: > -> - { Ok = bool } -> - { Err = Error } -> - "Pending" +> - "Table" +> - "HelpMenu" +> - { Horizontal = { config = Layout Config, splits = { Layout, ... } } -And then we'd go on documenting whatever `Error` is. +And then we'd go on documenting whatever `Layout Config` is. So, there you go. This is exactly what sum types are - glorified enums that can have nested types in each branch. @@ -89,7 +93,7 @@ have nested types in each branch. --- If you're still confused about something, or if you found an error in this -explaination, feel free to [discuss together][5]. +explanation, feel free to [discuss together][5]. [1]: https://en.wikipedia.org/wiki/Tagged_union [2]: layout.md diff --git a/docs/en/src/upgrade-guide.md b/docs/en/src/upgrade-guide.md index a7f2e76..417bff4 100644 --- a/docs/en/src/upgrade-guide.md +++ b/docs/en/src/upgrade-guide.md @@ -45,7 +45,7 @@ compatibility. ### Instructions -#### [v0.20.2][48] -> [v0.21.2][49] +#### [v0.20.2][48] -> [v0.21.3][49] - Some plugins might stop rendering colors. Wait for them to update. - Rename `xplr.config.general.sort_and_filter_ui.search_identifier` to @@ -81,7 +81,7 @@ compatibility. - `:ss` to create softlink of the selected items. - `:sh` to create hardlink of the selected items. - `:se` to edit selection list in your $EDITOR. - - Better conflict handling: add suffix rather than overriding/skipping. + - Better conflict handling: prompt for action. - Navigate between the selected paths using the following messages: - FocusPreviousSelection (`ctrl-p`) - FocusNextSelection (`ctrl-n`) @@ -118,6 +118,7 @@ compatibility. - xplr.util.shell_escape - Executables will me marked with the mime type: `application/x-executable`. - macOS legacy coreutils will be generally supported, but please update it. +- Since v0.21.2 you can use the on_selection_change hook. Thanks to @noahmayr for contributing to a major part of this release. @@ -516,5 +517,5 @@ Else do the following: [46]: https://github.com/sayanarijit/xplr/releases/tag/v0.18.0 [47]: https://github.com/sayanarijit/xplr/releases/tag/v0.19.4 [48]: https://github.com/sayanarijit/xplr/releases/tag/v0.20.2 -[49]: https://github.com/sayanarijit/xplr/releases/tag/v0.21.2 +[49]: https://github.com/sayanarijit/xplr/releases/tag/v0.21.3 [50]: https://github.com/lotabout/skim#search-syntax diff --git a/docs/landing/index.html b/docs/landing/index.html index d29ade9..1857081 100644 --- a/docs/landing/index.html +++ b/docs/landing/index.html @@ -151,7 +151,7 @@