-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🏗️ Splits PSM1, Removes
#Requires
from PSM1
Tests were failing because the module was not importable. The `#Requires` syntax being used in the root PSM1 prevented dependencies from being fully resolved before the module loading could complete, making the module unusable.
- Loading branch information
1 parent
d2b0385
commit 71d1c08
Showing
2 changed files
with
81 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/usr/bin/env pwsh | ||
$ErrorActionPreference = "Stop" | ||
Set-StrictMode -Version Latest | ||
#Requires -Modules @{ ModuleName = "poshy-lucidity"; RequiredVersion = "0.4.1" } | ||
|
||
|
||
function Invoke-VSCodeForPwd { | ||
&($Env:VSCODE ?? "code") . @args | ||
} | ||
Set-Alias -Name vsc -Value Invoke-VSCodeForPwd | ||
|
||
function Invoke-VSCodeAdd { | ||
&($Env:VSCODE ?? "code") --add @args | ||
} | ||
Set-Alias -Name vsca -Value Invoke-VSCodeAdd | ||
|
||
function Invoke-VSCodeDiff { | ||
&($Env:VSCODE ?? "code") --diff @args | ||
} | ||
Set-Alias -Name vscd -Value Invoke-VSCodeDiff | ||
|
||
function Invoke-VSCodeGoto { | ||
&($Env:VSCODE ?? "code") --goto @args | ||
} | ||
Set-Alias -Name vscg -Value Invoke-VSCodeGoto | ||
|
||
function Invoke-VSCodeNewWindow { | ||
&($Env:VSCODE ?? "code") --new-window Invoke-VSCodeNewWindow | ||
} | ||
Set-Alias -Name vscn -Value vscn | ||
|
||
function Invoke-VSCodeReuseWindow { | ||
&($Env:VSCODE ?? "code") --reuse-window @args | ||
} | ||
Set-Alias -Name vscr -Value Invoke-VSCodeReuseWindow | ||
|
||
function Invoke-VSCodeWithWait { | ||
&($Env:VSCODE ?? "code") --wait @args | ||
} | ||
Set-Alias -Name vscw -Value Invoke-VSCodeWithWait | ||
|
||
function Invoke-VSCodeWithUserDataDir { | ||
&($Env:VSCODE ?? "code") --user-data-dir @args | ||
} | ||
Set-Alias -Name vscu -Value Invoke-VSCodeWithUserDataDir | ||
|
||
function Invoke-VSCodeWithExtensionsDir { | ||
&($Env:VSCODE ?? "code") --extensions-dir @args | ||
} | ||
Set-Alias -Name vsced -Value Invoke-VSCodeWithExtensionsDir | ||
|
||
function Invoke-VSCodeInstallExtension { | ||
&($Env:VSCODE ?? "code") --install-extension @args | ||
} | ||
Set-Alias -Name vscie -Value Invoke-VSCodeInstallExtension | ||
|
||
function Invoke-VSCodeUninstallExtension { | ||
&($Env:VSCODE ?? "code") --uninstall-extension @args | ||
} | ||
Set-Alias -Name vscue -Value Invoke-VSCodeUninstallExtension | ||
|
||
function Invoke-VSCodeVerbose { | ||
&($Env:VSCODE ?? "code") --verbose @args | ||
} | ||
Set-Alias -Name vscv -Value Invoke-VSCodeVerbose | ||
|
||
function Invoke-VSCodeWithLog { | ||
&($Env:VSCODE ?? "code") --log @args | ||
} | ||
Set-Alias -Name vscl -Value Invoke-VSCodeWithLog | ||
|
||
function Invoke-VSCodeWithDisableExtensions { | ||
&($Env:VSCODE ?? "code") --disable-extensions @args | ||
} | ||
Set-Alias -Name vscde -Value Invoke-VSCodeWithDisableExtensions | ||
|
||
|
||
Export-ModuleMember -Function * -Alias * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,10 @@ | ||
#!/usr/bin/env pwsh | ||
$ErrorActionPreference = "Stop" | ||
Set-StrictMode -Version Latest | ||
#Requires -Modules @{ ModuleName = "poshy-lucidity"; RequiredVersion = "0.4.1" } | ||
|
||
|
||
if ((-not $Env:VSCODE) -and (-not (Test-Command code)) -and (-not (Get-Variable -Name PWSHRC_FORCE_MODULES_EXPORT_UNSUPPORTED -Scope Global -ValueOnly -ErrorAction SilentlyContinue))) { | ||
if ((-not $Env:VSCODE) -and (-not (Get-Command code -ErrorAction SilentlyContinue)) -and (-not (Get-Variable -Name PWSHRC_FORCE_MODULES_EXPORT_UNSUPPORTED -Scope Global -ValueOnly -ErrorAction SilentlyContinue))) { | ||
return | ||
} else { | ||
. "$PSScriptRoot/poshy-wrap-vscode.ps1" | ||
} | ||
|
||
function Invoke-VSCodeForPwd { | ||
&($Env:VSCODE ?? "code") . @args | ||
} | ||
Set-Alias -Name vsc -Value Invoke-VSCodeForPwd | ||
|
||
function Invoke-VSCodeAdd { | ||
&($Env:VSCODE ?? "code") --add @args | ||
} | ||
Set-Alias -Name vsca -Value Invoke-VSCodeAdd | ||
|
||
function Invoke-VSCodeDiff { | ||
&($Env:VSCODE ?? "code") --diff @args | ||
} | ||
Set-Alias -Name vscd -Value Invoke-VSCodeDiff | ||
|
||
function Invoke-VSCodeGoto { | ||
&($Env:VSCODE ?? "code") --goto @args | ||
} | ||
Set-Alias -Name vscg -Value Invoke-VSCodeGoto | ||
|
||
function Invoke-VSCodeNewWindow { | ||
&($Env:VSCODE ?? "code") --new-window Invoke-VSCodeNewWindow | ||
} | ||
Set-Alias -Name vscn -Value vscn | ||
|
||
function Invoke-VSCodeReuseWindow { | ||
&($Env:VSCODE ?? "code") --reuse-window @args | ||
} | ||
Set-Alias -Name vscr -Value Invoke-VSCodeReuseWindow | ||
|
||
function Invoke-VSCodeWithWait { | ||
&($Env:VSCODE ?? "code") --wait @args | ||
} | ||
Set-Alias -Name vscw -Value Invoke-VSCodeWithWait | ||
|
||
function Invoke-VSCodeWithUserDataDir { | ||
&($Env:VSCODE ?? "code") --user-data-dir @args | ||
} | ||
Set-Alias -Name vscu -Value Invoke-VSCodeWithUserDataDir | ||
|
||
function Invoke-VSCodeWithExtensionsDir { | ||
&($Env:VSCODE ?? "code") --extensions-dir @args | ||
} | ||
Set-Alias -Name vsced -Value Invoke-VSCodeWithExtensionsDir | ||
|
||
function Invoke-VSCodeInstallExtension { | ||
&($Env:VSCODE ?? "code") --install-extension @args | ||
} | ||
Set-Alias -Name vscie -Value Invoke-VSCodeInstallExtension | ||
|
||
function Invoke-VSCodeUninstallExtension { | ||
&($Env:VSCODE ?? "code") --uninstall-extension @args | ||
} | ||
Set-Alias -Name vscue -Value Invoke-VSCodeUninstallExtension | ||
|
||
function Invoke-VSCodeVerbose { | ||
&($Env:VSCODE ?? "code") --verbose @args | ||
} | ||
Set-Alias -Name vscv -Value Invoke-VSCodeVerbose | ||
|
||
function Invoke-VSCodeWithLog { | ||
&($Env:VSCODE ?? "code") --log @args | ||
} | ||
Set-Alias -Name vscl -Value Invoke-VSCodeWithLog | ||
|
||
function Invoke-VSCodeWithDisableExtensions { | ||
&($Env:VSCODE ?? "code") --disable-extensions @args | ||
} | ||
Set-Alias -Name vscde -Value Invoke-VSCodeWithDisableExtensions | ||
|
||
|
||
Export-ModuleMember -Function * -Alias * |