PackageTrack
Sign in Get early access

shlex

Split a string into shell words, like Python's shlex.

2.0.1 750M downloads/mo #102 most downloaded on crates.io comex/rust-shlex

What this package is like to depend on

Last release 3 months ago

17 May 2026

Release timing varies

gaps range from 5 months to 5.6 years

Nearly every release is documented

notes for 9 of 9 stable releases

Nothing withdrawn

no release was ever pulled

11 years old

9 releases · first in 2015

2 releases in the last 12 months

see the full history below

Release timeline

9 releases · Jun 2015 to May 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 9
  1. 2.0.1 17 May 2026
    Release notes
    • Fixes a compile error when building the documentation.
    Open source →
  2. 2.0.0 16 May 2026
    Release notes
    • Breaking: Items that were marked as deprecated in 1.x have been removed: join, quote, bytes::join, and bytes::quote.
    • Breaking: The DerefMut impl for Shlex has been removed since it was unsound. New unsafe APIs have been added in its place: Shlex::from_bytes, Shlex::as_bytes_mut.
    Open source →
  3. 1.3.0 22 Jan 2024
    Release notes

    Ref: GHSA-r7qv-8r2h-pg27

    • Deprecate quote APIs in favor of try_ equivalents that complain
      about nul bytes.

    • Also add a builder API, which allows re-enabling nul bytes without
      using the deprecated interface, and in the future can allow other
      things (as discussed in quoting_warning).

    • Add documentation about various security risks that remain,
      particularly with interactive shells.

    • Add fuzzers that actually verify round-trippability of the quote APIs
      against various shells, Python shlex, and C wordexp.

      • These are separate crates (as opposed to just being different files
        under fuzz/fuzz_targets) because they have different dependencies
        and build steps, and I don't want to agglomerate them all together.
        I've put them in the same workspace at least.

      • Also, check in Cargo.lock for the fuzzers, since they are binaries.

    • Add explicit MSRV of 1.46.0.

      This crate didn't previously have an explicit MSRV, but cargo msrv
      tells me that shlex 1.2.0 works down to Rust 1.36.0.

      Since this is a security fix, ideally the MSRV wouldn't be bumped at
      all, but that's not really feasible since the new API uses
      #[non_exhaustive], which was unstable in Rust 1.36.0. In case anyone
      is stuck on old Rust versions, I separately released a shlex 1.2.1 that
      only has the fix for {/}/\xa0, without the API changes.

      However, even for the full release I'd still like to keep the MSRV
      reasonably old. I picked 1.46.0 because it's the first version that
      wouldn't require completely redoing the const fn bitmask.

    • Add more authors to Cargo.toml based on Git commits.

    Open source →
    Release notes
    • Full fix for the high-severity security vulnerability RUSTSEC-2024-0006 a.k.a. GHSA-r7qv-8r2h-pg27:
      • Deprecates quote APIs in favor of try_ equivalents that complain about nul bytes.
      • Also adds a builder API, which allows re-enabling nul bytes without using the deprecated interface, and in the future can allow other things (as discussed in quoting_warning).
      • Adds documentation about various security risks that remain, particularly with interactive shells.
    • Adds explicit MSRV of 1.46.0.
    Open source →
  4. 1.2.1 22 Jan 2024
    Release notes Open source →
    Release notes
    • Partial fix for the high-severity security vulnerability RUSTSEC-2024-0006 a.k.a. GHSA-r7qv-8r2h-pg27 without bumping MSRV:
      • The bytes { and \xa0 are now escaped by quoting functions.
    Open source →
  5. 1.2.0 05 Sep 2023
    Release notes
    • Adds bytes module to support operating directly on byte strings.
    Open source →
  6. 1.1.0 27 Aug 2021
    Release notes
    • Adds the std feature (enabled by default).
    • Disabling the std feature makes the crate work in #![no_std] mode, assuming presence of the alloc crate.
    Open source →
  7. 1.0.0 03 Feb 2021
    Release notes
    • Adds the join convenience function.
    • Breaking: Fixes parsing of '\\n' to match the behavior of bash/Zsh/Python shlex. The result was previously \n, now it is \\n.
    Open source →
  8. 0.1.1 23 Jun 2015
    Release notes

    add # quotes, which I forgot about

    Open source →
    Release notes
    • Adds handling of # comments.
    Open source →
  9. 0.1.0 22 Jun 2015
    Release notes

    This is the initial release.

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive