diff --git a/home/.chezmoitemplates/nushell/env.nu.tmpl b/home/.chezmoitemplates/nushell/env.nu.tmpl index 399b3b6..3d07700 100644 --- a/home/.chezmoitemplates/nushell/env.nu.tmpl +++ b/home/.chezmoitemplates/nushell/env.nu.tmpl @@ -221,6 +221,10 @@ if ($dotnet_root | path exists) { let spicetify = ($env.HOME | path join ".spicetify") if ($spicetify | path exists) { $env.PATH = ($env.PATH | prepend $spicetify) } +# JetBrains Toolbox (IDE launcher and updater) +let jetbrains_bin = ($env.HOME | path join ".local" "share" "JetBrains" "Toolbox" "scripts") +if ($jetbrains_bin | path exists) { $env.PATH = ($env.PATH | prepend $jetbrains_bin) } + # Pulumi let pulumi_bin = ($env.HOME | path join ".pulumi" "bin") if ($pulumi_bin | path exists) { $env.PATH = ($env.PATH | prepend $pulumi_bin) } diff --git a/home/.chezmoitemplates/scripts/commonrc.fish.tmpl b/home/.chezmoitemplates/scripts/commonrc.fish.tmpl index bf8a244..d7d2af2 100644 --- a/home/.chezmoitemplates/scripts/commonrc.fish.tmpl +++ b/home/.chezmoitemplates/scripts/commonrc.fish.tmpl @@ -72,6 +72,9 @@ test -d $HOME/.spicetify && set -a paths_to_add $HOME/.spicetify # opencode test -d $HOME/.opencode/bin && set -a paths_to_add $HOME/.opencode/bin +# JetBrains Toolbox (IDE launcher and updater) +test -d $HOME/.local/share/JetBrains/Toolbox/scripts && set -a paths_to_add $HOME/.local/share/JetBrains/Toolbox/scripts + # pulumi test -d $HOME/.pulumi/bin && set -a paths_to_add $HOME/.pulumi/bin diff --git a/home/.chezmoitemplates/scripts/commonrc.sh.tmpl b/home/.chezmoitemplates/scripts/commonrc.sh.tmpl index d680db8..34dc336 100644 --- a/home/.chezmoitemplates/scripts/commonrc.sh.tmpl +++ b/home/.chezmoitemplates/scripts/commonrc.sh.tmpl @@ -66,6 +66,9 @@ esac # Spicetify (Spotify customization CLI) [ -d "$HOME/.spicetify" ] && export PATH="$PATH:$HOME/.spicetify" +# JetBrains Toolbox (IDE launcher and updater) +[ -d "$HOME/.local/share/JetBrains/Toolbox/scripts" ] && export PATH="$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts" + # Pulumi (Infrastructure as Code) [ -d "$HOME/.pulumi/bin" ] && export PATH="$PATH:$HOME/.pulumi/bin" @@ -136,6 +139,9 @@ fi # chatgpt CLI completions command -v chatgpt &> /dev/null && . <(chatgpt --set-completions {{ .shell }}) +# GitHub CLI completions +command -v gh &> /dev/null && eval "$(gh completion -s bash)" + [ -f "$HOME/.bash_aliases" ] && . "$HOME/.bash_aliases" # SSH editor override (always use micro when connected via SSH) diff --git a/home/Documents/PowerShell/Microsoft.PowerShell_profile.ps1.tmpl b/home/Documents/PowerShell/Microsoft.PowerShell_profile.ps1.tmpl index 3903e78..95b3ea0 100644 --- a/home/Documents/PowerShell/Microsoft.PowerShell_profile.ps1.tmpl +++ b/home/Documents/PowerShell/Microsoft.PowerShell_profile.ps1.tmpl @@ -85,4 +85,8 @@ function cdp { Set-Location (Get-Clipboard) } # Initialize completions if available if (Get-Command chezmoi -ErrorAction SilentlyContinue) { chezmoi completion powershell | Out-String | Invoke-Expression +} + +if (Get-Command gh -ErrorAction SilentlyContinue) { + Invoke-Expression -Command $(gh completion -s powershell | Out-String) } \ No newline at end of file diff --git a/home/dot_config/fish/functions/gh.fish b/home/dot_config/fish/functions/gh.fish new file mode 100644 index 0000000..d3f475d --- /dev/null +++ b/home/dot_config/fish/functions/gh.fish @@ -0,0 +1,18 @@ +# Lazy-load gh completions on first use +function gh --wraps gh + # Initialize gh completions only once + if not set -q __gh_initialized + set -g __gh_initialized 1 + + # Generate and source completions + if command -q gh + command gh completion -s fish | source + else + echo "gh is not installed" >&2 + return 1 + end + end + + # Execute the actual gh command + command gh $argv +end