Skip to content

into filesize can't handle the + sign #12968

@Schweber

Description

@Schweber

Describe the bug

$ "+8 KiB" | into filesize                                                                                                         
Error: nu::shell::cant_convert

  × Can't convert to int.
   ╭─[entry #31:1:1]
 1 │ "+8 KiB" | into filesize
   · ────┬───
   ·     ╰── can't convert string to int
   ╰────

@IanManske

How to reproduce

  1. "+8 KiB" | into filesize

Expected behavior

Handle the + sign correctly. The - sign is already handled correctly.

Screenshots

No response

Configuration

key value
version 0.93.0
major 0
minor 93
patch 0
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.77.2 (25ef9e3d8 2024-04-09) (built from a source tarball)
cargo_version cargo 1.77.1
build_time 1980-01-01 00:00:00 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, system-clipboard, trash, which
installed_plugins

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerspolishthis problem makes nu feel unpolished

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions