You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having this really annoying issue where every time I want to z into a folder with square brackets in the name, zoxide claims that there is "no match found." After looking around for a bit online, I assumed it was a problem with the brackets being treated as special characters, but escaping them doesn't work (and I think zoxide uses the -LiteralPath flag internally anyway?).
After messing around for a bit, I noticed that when the path name is totally incorrect, zoxide fails on line:29 char:9
"Set-Location -LiteralPath $dir -Passthru -ErrorAction Stop"
Running this line with a path that does exists but has square brackets, I was able to replicate the issue and isolate it to the -Passthru flag. The command "Set-Location -LiteralPath 'Enrico Mantini - Dancing on the Altar of Life []' -ErrorAction Stop" works perfectly, for example, as long as the Passthru flag is left out. I'm not sure how to fix this problem, whether this is a bug, or how to proceed since I have barely any knowledge about shell scripts or Powershell specifically. From my googling, Passthru just appears to send status messages to the terminal, so I don't know if it's even at fault.
Any advice on how to fix this would be really appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
(Running zoxide on Windows / Powershell)
I'm having this really annoying issue where every time I want to z into a folder with square brackets in the name, zoxide claims that there is "no match found." After looking around for a bit online, I assumed it was a problem with the brackets being treated as special characters, but escaping them doesn't work (and I think zoxide uses the -LiteralPath flag internally anyway?).
After messing around for a bit, I noticed that when the path name is totally incorrect, zoxide fails on line:29 char:9
"Set-Location -LiteralPath $dir -Passthru -ErrorAction Stop"
Running this line with a path that does exists but has square brackets, I was able to replicate the issue and isolate it to the -Passthru flag. The command "Set-Location -LiteralPath 'Enrico Mantini - Dancing on the Altar of Life []' -ErrorAction Stop" works perfectly, for example, as long as the Passthru flag is left out. I'm not sure how to fix this problem, whether this is a bug, or how to proceed since I have barely any knowledge about shell scripts or Powershell specifically. From my googling, Passthru just appears to send status messages to the terminal, so I don't know if it's even at fault.
Any advice on how to fix this would be really appreciated!
Beta Was this translation helpful? Give feedback.
All reactions