diff --git a/Scripts/go-downloads.ps1 b/Scripts/go-downloads.ps1 index c90e0050..e16507ef 100755 --- a/Scripts/go-downloads.ps1 +++ b/Scripts/go-downloads.ps1 @@ -1,4 +1,4 @@ -#!/usr/bin/pwsh +#!/usr/bin/pwsh <# .SYNTAX go-downloads.ps1 .DESCRIPTION go to the user's downloads folder @@ -7,7 +7,9 @@ #> try { - set-location $HOME/Downloads/ + $TargetDir = resolve-path "$HOME/Downloads/" + set-location "$TargetDir" + "📂 $TargetDir" exit 0 } catch { write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Scripts/go-home.ps1 b/Scripts/go-home.ps1 index d12adb77..acf06a66 100755 --- a/Scripts/go-home.ps1 +++ b/Scripts/go-home.ps1 @@ -1,4 +1,4 @@ -#!/usr/bin/pwsh +#!/usr/bin/pwsh <# .SYNTAX go-home.ps1 .DESCRIPTION go to the user's home folder @@ -7,7 +7,9 @@ #> try { - set-location $HOME + $TargetDir = resolve-path "$HOME/" + set-location "$TargetDir" + "📂 $TargetDir" exit 0 } catch { write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Scripts/go-music.ps1 b/Scripts/go-music.ps1 index 78c5c908..d6790b61 100755 --- a/Scripts/go-music.ps1 +++ b/Scripts/go-music.ps1 @@ -1,4 +1,4 @@ -#!/usr/bin/pwsh +#!/usr/bin/pwsh <# .SYNTAX go-music.ps1 .DESCRIPTION go to the user's music folder @@ -7,7 +7,9 @@ #> try { - set-location $HOME/Music/ + $TargetDir = resolve-path "$HOME/Music/" + set-location "$TargetDir" + "📂 $TargetDir" exit 0 } catch { write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Scripts/go-repos.ps1 b/Scripts/go-repos.ps1 index 16b98f80..6a6a6405 100644 --- a/Scripts/go-repos.ps1 +++ b/Scripts/go-repos.ps1 @@ -1,4 +1,4 @@ -#!/usr/bin/pwsh +#!/usr/bin/pwsh <# .SYNTAX go-repos.ps1 .DESCRIPTION go to the user's Git repositories folder @@ -7,7 +7,9 @@ #> try { - set-location $HOME/Repos/ + $TargetDir = resolve-path "$HOME/Repos/" + set-location "$TargetDir" + "📂 $TargetDir" exit 0 } catch { write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Scripts/go-root.ps1 b/Scripts/go-root.ps1 index 9d24c17d..daf7f203 100755 --- a/Scripts/go-root.ps1 +++ b/Scripts/go-root.ps1 @@ -1,4 +1,4 @@ -#!/usr/bin/pwsh +#!/usr/bin/pwsh <# .SYNTAX go-root.ps1 .DESCRIPTION go to the root directory (C: on Windows) @@ -8,10 +8,12 @@ try { if ($IsLinux) { - set-location / + $TargetDir = resolve-path "/" } else { - set-location C: + $TargetDir = resolve-path "C:/" } + set-location "$TargetDir" + "📂 $TargetDir" exit 0 } catch { write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Scripts/go-scripts.ps1 b/Scripts/go-scripts.ps1 index e6bc43b0..befda41f 100755 --- a/Scripts/go-scripts.ps1 +++ b/Scripts/go-scripts.ps1 @@ -1,4 +1,4 @@ -#!/usr/bin/pwsh +#!/usr/bin/pwsh <# .SYNTAX go-scripts.ps1 .DESCRIPTION go to the PowerShell Scripts folder @@ -7,7 +7,9 @@ #> try { - set-location $PSScriptRoot + $TargetDir = resolve-path "$PSScriptRoot/" + set-location "$TargetDir" + "📂 $TargetDir" exit 0 } catch { write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"