diff --git a/bin/windows/create_completion_files.ps1 b/bin/windows/create_completion_files.ps1 new file mode 100644 index 0000000..e6579ca --- /dev/null +++ b/bin/windows/create_completion_files.ps1 @@ -0,0 +1,16 @@ +# create completion scripts file + +$script_location = "$HOME\.config\powershell\completions" +if (!(Test-Path $script_location)) { + echo "No existing completions" + echo "Creating ~/.config/powershell/completions..." + mkdir $script_location +} + +# write +Get-ChildItem $script_location | Remove-Item +rclone completion powershell > (Join-Path $script_location "rclone_completion.ps1") +rustup completions powershell > (Join-Path $script_location "rustup_completion.ps1") +wezterm shell-completion --shell power-shell > (Join-Path $script_location "wezterm_completion.ps1") +chezmoi completion powershell > (Join-Path $script_location "chezmoi_completion.ps1") + diff --git a/dotfiles/pwsh/powershell_profile.ps1 b/dotfiles/pwsh/powershell_profile.ps1 index 6e92a0b..77ee8fc 100644 --- a/dotfiles/pwsh/powershell_profile.ps1 +++ b/dotfiles/pwsh/powershell_profile.ps1 @@ -169,10 +169,10 @@ Import-Module scoop-completion #Import-Module "$($(Get-Item $(Get-Command scoop.ps1).Path).Directory.Parent.FullName)\modules\scoop-completion" # chezmoi completion -$chezmoi_script = "$HOME\.config\powershell\chezmoi_completion.ps1" -if (Test-Path $chezmoi_script) { - . $chezmoi_script -} +#$chezmoi_script = "$HOME\.config\powershell\chezmoi_completion.ps1" +#if (Test-Path $chezmoi_script) { +# . $chezmoi_script +#} # git completion Import-Module posh-git @@ -199,15 +199,16 @@ if (Test-Path($ChocolateyProfile)) { } # rclone -rclone completion powershell | Out-String | Invoke-Expression +#rclone completion powershell | Out-String | Invoke-Expression # node Import-Module npm-completion - # rustup completion -$rustup_script = "$HOME\.config\powershell\rustup_completion.ps1" -if (Test-Path $rustup_script) { - . $rustup_script -} +#rustup completions powershell | Out-String | Invoke-Expression + +# wezterm +#wezterm shell-completion --shell power-shell | Out-String | Invoke-Expression + +Get-ChildItem ~\.config\powershell\completions\ | % { & $_ }