Files
omarchy/default/bash/aliases
James Robey adfe182984 Use subshell for open() to avoid job control output (#4366)
If it is not run as a sub-shell, using open and then subsequently closing the app will pollute the existing terminal with messages like:
  [1] 287915
  [1]+  Done  xdg-open "$@" > /dev/null 2>&1

Making it a subshell removes this noise and keeps it more like the open command in macOS.
2026-01-27 11:34:16 +01:00

44 lines
906 B
Plaintext

# File system
if command -v eza &> /dev/null; then
alias ls='eza -lh --group-directories-first --icons=auto'
alias lsa='ls -a'
alias lt='eza --tree --level=2 --long --icons --git'
alias lta='lt -a'
fi
alias ff="fzf --preview 'bat --style=numbers --color=always {}'"
if command -v zoxide &> /dev/null; then
alias cd="zd"
zd() {
if [ $# -eq 0 ]; then
builtin cd ~ && return
elif [ -d "$1" ]; then
builtin cd "$1"
else
z "$@" && printf "\U000F17A9 " && pwd || echo "Error: Directory not found"
fi
}
fi
open() (
xdg-open "$@" >/dev/null 2>&1 &
)
# Directories
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
# Tools
alias c='opencode'
alias d='docker'
alias r='rails'
n() { if [ "$#" -eq 0 ]; then nvim .; else nvim "$@"; fi; }
# Git
alias g='git'
alias gcm='git commit -m'
alias gcam='git commit -a -m'
alias gcad='git commit -a --amend'