Skip to content

passing @sel.path with escaped characters to powershell #547

Open
@skotarek

Description

@skotarek

item(title="Command Prompt" tip=tip_run_admin admin=has_admin image='@package.path("WindowsTerminal")\WindowsTerminal.exe' cmd="wt.exe" arg=`-d "@sel.path\." -p "Command Prompt"`)

item(title="Git Bash" tip=tip_run_admin admin=has_admin image='@package.path("WindowsTerminal")\WindowsTerminal.exe' cmd="wt.exe" arg=`-d "@sel.path\." -p "Git Bash"`)

item(title="Windows PowerShell" tip=tip_run_admin admin=has_admin image='@package.path("WindowsTerminal")\WindowsTerminal.exe' cmd="wt.exe" arg=`-d "@sel.path\." -p "Windows PowerShell"`)

this is my config for running windows terminal instances of cmd, git, and powershell
until recently I thought it worked well however after some trial and error I noticed that powershell instance does not open the locations with some specific characters (in my case: the square brackets), these characters need to be escaped with a backtick before them, how can I achieve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions