mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-22 04:45:20 +00:00
Add path escapes for powershell (#313)
This commit is contained in:
parent
5d81f1f22d
commit
ff28b02801
@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- PowerShell: use global scope for aliases.
|
- PowerShell: use global scope for aliases.
|
||||||
- Zsh: fix errors with `set -eu`.
|
- Zsh: fix errors with `set -eu`.
|
||||||
- Fzf: handle early selection.
|
- Fzf: handle early selection.
|
||||||
|
- PowerShell: correctly handle escape characters in paths.
|
||||||
|
|
||||||
## [0.7.9] - 2021-11-02
|
## [0.7.9] - 2021-11-02
|
||||||
|
|
||||||
|
@ -7,17 +7,19 @@
|
|||||||
|
|
||||||
# pwd based on zoxide's format.
|
# pwd based on zoxide's format.
|
||||||
function __zoxide_pwd {
|
function __zoxide_pwd {
|
||||||
$__zoxide_pwd = Get-Location
|
$cwd = Get-Location
|
||||||
if ($__zoxide_pwd.Provider.Name -eq "FileSystem") {
|
if ($cwd.Provider.Name -eq "FileSystem") {
|
||||||
$__zoxide_pwd.ProviderPath
|
$cwd.ProviderPath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# cd + custom logic based on the value of _ZO_ECHO.
|
# cd + custom logic based on the value of _ZO_ECHO.
|
||||||
function __zoxide_cd($dir) {
|
function __zoxide_cd($dir) {
|
||||||
Set-Location $dir -ea Stop
|
|
||||||
{%- if echo %}
|
{%- if echo %}
|
||||||
$(Get-Location).Path
|
$dir = Set-Location -LiteralPath $dir -Passthru -ErrorAction Stop
|
||||||
|
Write-Output $dir.Path
|
||||||
|
{%- else %}
|
||||||
|
Set-Location -LiteralPath $dir -ErrorAction Stop
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user