mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-07 18:06:48 -06:00
refactor: standardize shell aliases and remove Bitwarden login helpers
Remove the custom `bw_login` function/alias from Nushell, bash, and PowerShell configurations as it's no longer needed. Expand PowerShell profile with comprehensive git aliases matching bash conventions, add clipboard navigation helper (`cdp`), and enable chezmoi completions.
This commit is contained in:
@@ -956,11 +956,6 @@ alias spt = spotify_player
|
|||||||
alias mousefix = sudo udevadm trigger
|
alias mousefix = sudo udevadm trigger
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
# Bitwarden login (sets environment variable)
|
|
||||||
def bw_login [] {
|
|
||||||
$env.BW_SESSION = (bw unlock --raw)
|
|
||||||
}
|
|
||||||
|
|
||||||
# Clipboard aliases
|
# Clipboard aliases
|
||||||
{{ if eq .chezmoi.os "windows" }}
|
{{ if eq .chezmoi.os "windows" }}
|
||||||
alias copy = clip.exe
|
alias copy = clip.exe
|
||||||
|
|||||||
@@ -14,32 +14,69 @@ if (Get-Command mise -ErrorAction SilentlyContinue) {
|
|||||||
Invoke-Expression (& mise activate pwsh | Out-String)
|
Invoke-Expression (& mise activate pwsh | Out-String)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Aliases - PowerShell equivalents of bash aliases
|
# ----------------------
|
||||||
|
# Core Aliases
|
||||||
|
# ----------------------
|
||||||
Set-Alias -Name nano -Value micro
|
Set-Alias -Name nano -Value micro
|
||||||
Set-Alias -Name vim -Value nvim
|
Set-Alias -Name vim -Value nvim
|
||||||
Set-Alias -Name lg -Value lazygit
|
Set-Alias -Name lg -Value lazygit
|
||||||
|
|
||||||
# Functions
|
# Directory listing
|
||||||
function ll { Get-ChildItem -Force | Format-Table -AutoSize }
|
function ll { Get-ChildItem -Force | Format-Table -AutoSize }
|
||||||
function la { Get-ChildItem -Force }
|
function la { Get-ChildItem -Force }
|
||||||
function es { & $PROFILE } # Reload profile
|
function l { Get-ChildItem }
|
||||||
|
|
||||||
# Chezmoi aliases
|
# Reload shell profile
|
||||||
function cha { chezmoi apply --interactive }
|
function es { & $PROFILE }
|
||||||
|
|
||||||
|
# ----------------------
|
||||||
|
# Chezmoi Aliases
|
||||||
|
# ----------------------
|
||||||
Set-Alias -Name ch -Value chezmoi
|
Set-Alias -Name ch -Value chezmoi
|
||||||
|
function cha { chezmoi apply --interactive }
|
||||||
|
function chlg { lazygit --path {{ .chezmoi.config.sourceDir }} }
|
||||||
|
|
||||||
# Git aliases
|
# ----------------------
|
||||||
|
# Git Aliases
|
||||||
|
# ----------------------
|
||||||
function ga { git add $args }
|
function ga { git add $args }
|
||||||
function gaa { git add . }
|
function gaa { git add . }
|
||||||
|
function gaaa { git add --all }
|
||||||
|
function gau { git add --update }
|
||||||
|
function gb { git branch $args }
|
||||||
|
function gbd { git branch --delete $args }
|
||||||
function gc { git commit $args }
|
function gc { git commit $args }
|
||||||
function gcm { git commit -m $args }
|
function gcm { git commit --message $args }
|
||||||
|
function gcf { git commit --fixup $args }
|
||||||
function gco { git checkout $args }
|
function gco { git checkout $args }
|
||||||
|
function gcob { git checkout -b $args }
|
||||||
|
function gcom { git checkout master }
|
||||||
|
function gcos { git checkout staging }
|
||||||
|
function gcod { git checkout develop }
|
||||||
function gd { git diff $args }
|
function gd { git diff $args }
|
||||||
function gs { git status $args }
|
function gda { git diff HEAD }
|
||||||
|
function glg { git log --graph --oneline --decorate --all }
|
||||||
|
function gld { git log --pretty=format:"%h %ad %s" --date=short --all }
|
||||||
|
function gm { git merge --no-ff $args }
|
||||||
|
function gma { git merge --abort }
|
||||||
|
function gmc { git merge --continue }
|
||||||
function gp { git pull $args }
|
function gp { git pull $args }
|
||||||
|
function gpr { git pull --rebase $args }
|
||||||
|
function gr { git rebase $args }
|
||||||
|
function gs { git status $args }
|
||||||
|
function gss { git status --short }
|
||||||
function gst { git stash $args }
|
function gst { git stash $args }
|
||||||
|
function gsta { git stash apply $args }
|
||||||
|
function gstd { git stash drop $args }
|
||||||
|
function gstl { git stash list }
|
||||||
|
function gstp { git stash pop $args }
|
||||||
|
function gsts { git stash save $args }
|
||||||
|
function glf { git log --all --grep="$args" }
|
||||||
|
|
||||||
|
# Clipboard aliases (Windows native)
|
||||||
|
function cdp { Set-Location (Get-Clipboard) }
|
||||||
|
|
||||||
# Initialize completions if available
|
# Initialize completions if available
|
||||||
if (Get-Command chezmoi -ErrorAction SilentlyContinue) {
|
if (Get-Command chezmoi -ErrorAction SilentlyContinue) {
|
||||||
# Chezmoi completion can be set up if needed
|
chezmoi completion powershell | Out-String | Invoke-Expression
|
||||||
}
|
}
|
||||||
@@ -33,7 +33,6 @@ alias suggest='gh copilot suggest -t shell'
|
|||||||
alias spt='spotify_player'
|
alias spt='spotify_player'
|
||||||
alias gitalias='alias | grep "git "'
|
alias gitalias='alias | grep "git "'
|
||||||
alias mousefix='sudo udevadm trigger' # helped with mouse issues on laptop
|
alias mousefix='sudo udevadm trigger' # helped with mouse issues on laptop
|
||||||
alias bw_login='export BW_SESSION=$(bw unlock --raw)'
|
|
||||||
|
|
||||||
# Clipboard aliases
|
# Clipboard aliases
|
||||||
{{ if not .wsl -}}
|
{{ if not .wsl -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user