diff --git a/scripts/cd-docs.ps1 b/scripts/cd-docs.ps1 index 1e99115f..e821f4a5 100755 --- a/scripts/cd-docs.ps1 +++ b/scripts/cd-docs.ps1 @@ -1,11 +1,11 @@ ο»Ώ<# .SYNOPSIS - Sets the working directory to the documents folder + Sets the working dir to the documents folder .DESCRIPTION - This PowerShell script changes the working directory to the documents folder. + This PowerShell script sets the current working directory to the documents folder. .EXAMPLE - PS> ./cd-docs - πŸ“‚C:\Users\Markus\Documents entered (has 3 files and 0 folders) + PS> ./cd-docs.ps1 + πŸ“‚C:\Users\Markus\Documents with 3 files and 0 folders entered. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -15,19 +15,19 @@ try { if ($IsLinux -or $IsMacOS) { if (-not(Test-Path "~/Documents" -pathType container)) { - throw "No πŸ“‚Documents folder in your home directory yet" + throw "No 'Documents' folder in your home directory yet" } $path = Resolve-Path "~/Documents" } else { $path = [Environment]::GetFolderPath('MyDocuments') if (-not(Test-Path "$path" -pathType container)) { - throw "No documents folder at πŸ“‚$path yet" + throw "No documents folder at: $path yet" } } Set-Location "$path" $files = Get-ChildItem $path -attributes !Directory $folders = Get-ChildItem $path -attributes Directory - "πŸ“‚$path entered (has $($files.Count) files and $($folders.Count) folders)" + "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { "⚠️ Error: $($Error[0])" diff --git a/scripts/cd-ssh.ps1 b/scripts/cd-ssh.ps1 index d0e33c68..3012dbab 100755 --- a/scripts/cd-ssh.ps1 +++ b/scripts/cd-ssh.ps1 @@ -1,11 +1,11 @@ ο»Ώ<# .SYNOPSIS - Sets the working directory to the SSH folder + Sets the working dir to the SSH folder .DESCRIPTION - This PowerShell script changes the working directory to the user's secure shell (SSH) folder. + This PowerShell script sets the current working directory to the user's secure shell (SSH) folder. .EXAMPLE PS> ./cd-ssh.ps1 - πŸ“‚C:\Users\Markus\.ssh entered (has 4 files) + πŸ“‚C:\Users\Markus\.ssh with 4 files entered. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -15,12 +15,12 @@ try { $path = "~/.ssh" if (-not(Test-Path "$path" -pathType container)) { - throw "No secure shell (SSH) folder at $path" + throw "No '.ssh' folder in your home directory yet - Is SSH installed?" } $path = Resolve-Path "$path" Set-Location "$path" $files = Get-ChildItem $path -attributes !Directory - "πŸ“‚$path entered (has $($files.Count) files)" + "πŸ“‚$path with $($files.Count) files entered." exit 0 # success } catch { "⚠️ Error: $($Error[0])"