Skip to content

set PATH arg:with:colons prints superfluous error #8095

@lilyball

Description

@lilyball

In Fish 3.2 and earlier, the following works just fine:

set PATH /usr/local/bin:/usr/bin

This splits the input on colons and sets $PATH to the result.

In Fish 3.3.0, this is broken. The above code will result in a warning and not actually change the value of $PATH at all:

set: Warning: $PATH entry "/usr/local/bin:/usr/bin" is not valid (No such file or directory)
set: Did you mean 'set PATH $PATH /usr/bin'?

The colon-splitting behavior still works just fine with other path variables (such as $MANPATH or variables defined using set --path), but it simply won't work with PATH even if I pass the --path flag.

This is especially problematic for code that sets variables without knowing what they are. For example, this triggers on code of mine that looks like

set -xg (string split -m 1 = $line)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intendedregressionSomething that used to work, but was broken, especially between releases

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions