mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-17 03:19:07 +01:00
Updated cd-repos.ps1
This commit is contained in:
parent
714f53a90a
commit
1fd0b93746
@ -7,7 +7,11 @@
|
|||||||
Specifies an additional relative subpath (optional)
|
Specifies an additional relative subpath (optional)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./cd-repos
|
PS> ./cd-repos
|
||||||
📂C:\Users\Markus\source\Repos
|
📂C:\Users\Markus\Repos
|
||||||
|
|
||||||
|
PS> ./cd-repos rust
|
||||||
|
📂C:\Users\Markus\Repos\rust
|
||||||
|
on branch: ## main ... origin/main
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -35,7 +39,11 @@ try {
|
|||||||
$path = Resolve-Path "$path"
|
$path = Resolve-Path "$path"
|
||||||
Set-Location "$path"
|
Set-Location "$path"
|
||||||
"📂$path"
|
"📂$path"
|
||||||
if ("$subpath" -ne "") { & git status --short --branch --show-stash }
|
|
||||||
|
if ("$subpath" -ne "") {
|
||||||
|
Write-Host -noNewline " on branch: "
|
||||||
|
& git status --short --branch --show-stash
|
||||||
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0])"
|
"⚠️ Error: $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user