mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-06 20:47:36 +00:00
shell: starship + shared aliases for bash and zsh
- .chezmoidata/aliases.yaml: single source for shell-agnostic aliases - fish 20-aliases.fish -> .tmpl rendered from that data (fish-only bits: clipboard detection, q function, interactive eza) - dot_config/shell/aliases.sh.tmpl: same data for bash/zsh - dot_bashrc/dot_zshrc: managed rc files with starship init (replaces unmanaged flyline/p10k prompts), guarded cargo/atuin/envman
This commit is contained in:
1 parent
352424c0c1
commit
8b67a8f8e8
9 files changed
+179
-71
No files matched your search
@@ -0,0 +1,40 @@
|
||||
# Aliases — generated from .chezmoidata/aliases.yaml (shared with bash/zsh
|
||||
# via ~/.config/shell/aliases.sh). Add shell-agnostic aliases in the YAML;
|
||||
# fish-only bits live below the generated block.
|
||||
{{- range .aliases }}
|
||||
|
||||
# {{ .section }}
|
||||
{{- range .items }}
|
||||
alias {{ .name }} {{ if contains " " .cmd }}'{{ .cmd }}'{{ else }}{{ .cmd }}{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
# Clipboard
|
||||
if command -v wl-copy >/dev/null 2>&1
|
||||
alias cpy wl-copy
|
||||
alias pst wl-paste
|
||||
else if command -v pbcopy >/dev/null 2>&1
|
||||
alias cpy pbcopy
|
||||
alias pst pbpaste
|
||||
end
|
||||
|
||||
# q exits the shell; if this shell was spawned from yazi's own `q` bind
|
||||
# (`shell "$SHELL" --block`), also tell that yazi to quit so exiting
|
||||
# doesn't bounce back into the file manager.
|
||||
function q --description 'exit (and quit parent yazi)'
|
||||
if set -q YAZI_ID; and command -q ya
|
||||
ya emit quit 2>/dev/null
|
||||
end
|
||||
exit
|
||||
end
|
||||
|
||||
# Interactive-only: don't override `ls` for scripts.
|
||||
if status is-interactive
|
||||
# `clear` is functions/clear.fish (kitty scrollback + bottom-pinned
|
||||
# prompt) — don't alias it here, an alias would shadow the autoload.
|
||||
alias celar clear
|
||||
alias claer clear
|
||||
if command -v eza >/dev/null 2>&1
|
||||
alias ls 'eza --icons'
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user