Updated the manuals

This commit is contained in:
Markus Fleschutz
2024-08-15 09:51:46 +02:00
parent 654d1a18d0
commit e1ffab5509
633 changed files with 2120 additions and 973 deletions

View File

@ -1,7 +1,7 @@
Script: *cd-repo.ps1*
========================
This PowerShell script changes the working directory to a Git repository.
This PowerShell script changes the working directory to a local Git repository.
Parameters
----------
@ -9,7 +9,7 @@ Parameters
PS> ./cd-repo.ps1 [[-folderName] <String>] [<CommonParameters>]
-folderName <String>
Specifies the folder name
Specifies the Git repository's folder name
Required? false
Position? 1
@ -26,7 +26,7 @@ Example
-------
```powershell
PS> ./cd-repo.ps1 rust
📂C:\Repos\rust on Git branch: ## main ... origin/main
📂C:\Repos\rust - current branch is: ## main ... origin/main
```
@ -45,12 +45,12 @@ Script Content
.SYNOPSIS
Sets the working directory to a repository
.DESCRIPTION
This PowerShell script changes the working directory to a Git repository.
This PowerShell script changes the working directory to a local Git repository.
.PARAMETER folderName
Specifies the folder name
Specifies the Git repository's folder name
.EXAMPLE
PS> ./cd-repo.ps1 rust
📂C:\Repos\rust • on Git branch: ## main ... origin/main
📂C:\Repos\rust - current branch is: ## main ... origin/main
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
@ -60,7 +60,7 @@ Script Content
param([string]$folderName = "")
try {
if ("$folderName" -eq "") { $folderName = Read-Host "Enter the folder name" }
if ("$folderName" -eq "") { $folderName = Read-Host "Enter the Git repository's folder name" }
if (Test-Path "$HOME/Repos/" -pathType Container) { # try short name
$path = "$HOME/Repos/"
@ -80,8 +80,7 @@ try {
if (-not(Test-Path "$path" -pathType Container)) { throw "The path to 📂$path doesn't exist (yet)" }
$path = Resolve-Path "$path"
Set-Location "$path"
Write-Host "📂$path • on Git branch: " -noNewline
Write-Host "📂$path - current branch is: " -noNewline
& git status --short --branch --show-stash
exit 0 # success
} catch {
@ -90,4 +89,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-repo.ps1 as of 05/19/2024 10:25:17)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-repo.ps1 as of 08/15/2024 09:50:45)*