Skip to content

[Bug]: "$(pwd)" syntax not supported in fish < 3.4 #850

@sgentle

Description

@sgentle

Current Behavior (bug)

/var/folders/dp/hwmtf9bs5hn9z2mm2t8g38z80000gn/T/devbox2349844254/config.fish (line 146): $(...) is not supported. In fish, please use '(pwd)'.
set workingDir "$(pwd)"
                ^
from sourcing file /var/folders/dp/hwmtf9bs5hn9z2mm2t8g38z80000gn/T/devbox2349844254/config.fish

Expected Behavior (fix)

Additional context
The offending line is /internal/impl/shellrc_fish.tmpl:55 though I believe line 85 would have a similar issue.

I'm running devbox 0.4.5 and fish 3.3 (not for any particular reason, just haven't upgraded) and I'm assuming this is an accidental incompatibility.

You may not need the quotes anyway – fish doesn't split command substitution on spaces, so this works:

/tmp > mkdir 'hello world'
/tmp > cd 'hello world'
/tmp/hello world > set foo (pwd)
/tmp/hello world > cd ..
/tmp > cd $foo
/tmp/hello world >

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions