Open skotarek opened 3 weeks ago
To change the path separator, use the path.sep
function.
// C:\Windows\System32\
path.sep(sel.path,"\\\\")
// C:\\Windows\\System32\\
Or use the str.replace
function in general.
str.replace(sel.path,'\','\\')
To change the path separator, use the
path.sep
function.// C:\Windows\System32\ path.sep(sel.path,"\\\\") // C:\\Windows\\System32\\
Or use the
str.replace
function in general.str.replace(sel.path,'\','\\')
tried both, same results
Passing a path with square brackets to wt.exe is not possible. (... to PowerShell is possible)
Passing a path with square brackets to wt.exe is not possible. (... to PowerShell is possible)
yeah but if I do that then it opens as a new window of wt.exe instead of a new tab
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?