mirror of
https://github.com/Xevion/dotfiles.git
synced 2026-01-31 08:24:11 -06:00
config: add JetBrains Toolbox and GitHub CLI completions
- Add JetBrains Toolbox scripts directory to PATH across shells - Initialize GitHub CLI completions in bash, fish, and PowerShell - Lazy-load gh completions in Fish to improve startup time
This commit is contained in:
@@ -221,6 +221,10 @@ if ($dotnet_root | path exists) {
|
|||||||
let spicetify = ($env.HOME | path join ".spicetify")
|
let spicetify = ($env.HOME | path join ".spicetify")
|
||||||
if ($spicetify | path exists) { $env.PATH = ($env.PATH | prepend $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
|
# Pulumi
|
||||||
let pulumi_bin = ($env.HOME | path join ".pulumi" "bin")
|
let pulumi_bin = ($env.HOME | path join ".pulumi" "bin")
|
||||||
if ($pulumi_bin | path exists) { $env.PATH = ($env.PATH | prepend $pulumi_bin) }
|
if ($pulumi_bin | path exists) { $env.PATH = ($env.PATH | prepend $pulumi_bin) }
|
||||||
|
|||||||
@@ -72,6 +72,9 @@ test -d $HOME/.spicetify && set -a paths_to_add $HOME/.spicetify
|
|||||||
# opencode
|
# opencode
|
||||||
test -d $HOME/.opencode/bin && set -a paths_to_add $HOME/.opencode/bin
|
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
|
# pulumi
|
||||||
test -d $HOME/.pulumi/bin && set -a paths_to_add $HOME/.pulumi/bin
|
test -d $HOME/.pulumi/bin && set -a paths_to_add $HOME/.pulumi/bin
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,9 @@ esac
|
|||||||
# Spicetify (Spotify customization CLI)
|
# Spicetify (Spotify customization CLI)
|
||||||
[ -d "$HOME/.spicetify" ] && export PATH="$PATH:$HOME/.spicetify"
|
[ -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)
|
# Pulumi (Infrastructure as Code)
|
||||||
[ -d "$HOME/.pulumi/bin" ] && export PATH="$PATH:$HOME/.pulumi/bin"
|
[ -d "$HOME/.pulumi/bin" ] && export PATH="$PATH:$HOME/.pulumi/bin"
|
||||||
|
|
||||||
@@ -136,6 +139,9 @@ fi
|
|||||||
# chatgpt CLI completions
|
# chatgpt CLI completions
|
||||||
command -v chatgpt &> /dev/null && . <(chatgpt --set-completions {{ .shell }})
|
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"
|
[ -f "$HOME/.bash_aliases" ] && . "$HOME/.bash_aliases"
|
||||||
|
|
||||||
# SSH editor override (always use micro when connected via SSH)
|
# SSH editor override (always use micro when connected via SSH)
|
||||||
|
|||||||
@@ -86,3 +86,7 @@ function cdp { Set-Location (Get-Clipboard) }
|
|||||||
if (Get-Command chezmoi -ErrorAction SilentlyContinue) {
|
if (Get-Command chezmoi -ErrorAction SilentlyContinue) {
|
||||||
chezmoi completion powershell | Out-String | Invoke-Expression
|
chezmoi completion powershell | Out-String | Invoke-Expression
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Get-Command gh -ErrorAction SilentlyContinue) {
|
||||||
|
Invoke-Expression -Command $(gh completion -s powershell | Out-String)
|
||||||
|
}
|
||||||
@@ -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
|
||||||
Reference in New Issue
Block a user