IlanCosman/tide

Error when a directory name contains a pair of parentheses

kimkanu opened this issue · 4 comments

Describe the bug

When the name of a directory contains a pair of parentheses, it gives the following error: Unknown command: <something inside the parentheses>

// cd "/Users/keonwoo/Downloads/sandbox/app/(content)/@async"

fish: Unknown command: content
fish: 
content
^~~~~~^
in command substitution
fish: Unknown command
set _tide_parent_dirs  /Users /Users/keonwoo /Users/keonwoo/Downloads /Users/keonwoo/Downloads/sandbox /Users/keonwoo/Downloads/sandbox/app /Users/keonwoo/Downloads/sandbox/app/(content) /Users/keonwoo/Downloads/sandbox/app/(content)/@async

Steps to reproduce

  1. Create a directory named (test)
  2. Open that directory in the fish shell with tide installed
  3. See error

Screenshots

Environment

Output of tide bug-report:

fish version: 3.6.4
tide version: 5.5.0
term: xterm-256color
os: macOS Sonoma 14.1.2 (23B92)
terminal emulator: macOS Terminal
fish startup: Now using Node v21.2.0 (npm 10.2.5) ~/.local/share/nvm/v21.2.0/bin/node
fisher plugins: jorgebucaran/fisher dracula/fish ilancosman/tide@v5 jorgebucaran/nvm.fish

Additional context

I got the issue fixed when I quoted \$_tide_parent_dirs part at fish_prompt.fish:L42,L71:

    eval "
function fish_prompt
    ...
- set _tide_parent_dirs \$_tide_parent_dirs
+ set _tide_parent_dirs \"\$_tide_parent_dirs\"
    ...
end

Hmm, yah _tide_parent_dirs needs to be tested 😩Escaping and passing things around is such a pain lol

Sorry, I think it is not an issue anymore in v6. I was using v5 and I noticed that the recent version is v6.

Um, let me open this again for possible bugs... Sorry for messing up. After testing _tide_parent_dirs you can close this issue as the error was gone after I upgraded tide to v6. (I think)

Yah, cant reproduce the bug with latest versions. I didn't even check your version, tide bug-report should have told you to update lol.