Skip to content

Incorrectly tries to parse HTML style escapes in file names when using expansion #1117

@crabdancing

Description

@crabdancing

Current Behavior

Tries to parse % as an HTML escape char. My guess is some internal mechanism needs the file path to be properly escaped before handling it?

[{"value":"--ERR","display":"ERR","description":"parse \"file:///tmp/test-files/hi%d\": invalid URL escape \"%d\"","style":{"fg":"red","attr":"b"}},{"value":"--_","display":"_"}]

Expected Behavior

Should not do that.

Steps To Reproduce

mkdir /tmp/test-files
cd /tmp/test-files
touch /tmp/test-files/hi%d
carapace ls nushell --

Gives us:

[{"value":"--ERR","display":"ERR","description":"parse \"file:///tmp/test-files/hi%d\": invalid URL escape \"%d\"","style":{"fg":"red","attr":"b"}},{"value":"--_","display":"_"}]

Also reproduced by @blindFS

Version

1.0.7

OS

  • Darwin
  • Linux
  • Termux
  • Windows

Shell

  • Bash
  • Cmd
  • Elvish
  • Fish
  • Nushell
  • Oil
  • Powershell
  • Xonsh
  • Zsh

Anything else?

No response

Polar

Fund with Polar

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions