diff --git a/.bash_aliases b/.bash_aliases index 2b928c8..9577b79 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -41,7 +41,7 @@ alias rm='rm -I' alias cp='cp -i' alias mv='mv -i' -# Bash completion +# Completion and Extras src() { test -f "$1" && source "$1"; } @@ -52,7 +52,6 @@ bind '"\ej":history-search-forward' shopt -oq posix || src /etc/bash_completion # Fancy prompt - PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]" PS1="$PS1 \`if [ \$? = 0 ]; then echo -e '\[\033[01;32m\]:)';" PS1="$PS1 else echo -e '\[\033[01;31m\]' \$?; fi\`\[\033[00m\]" diff --git a/.config/shell/functions b/.config/shell/functions index d34dd09..6d34afb 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -175,11 +175,11 @@ alias syslog='less +F /var/log/syslog' alias sc='sudo systemctl' alias scd='sudo systemctl disable --now' +unalias scs sce 2>/dev/null sce() { sudo systemctl enable --now "$@" || sudo systemctl status "$@" } -unalias scs 2>/dev/null scs() { ( export SYSTEMD_COLORS=true @@ -478,7 +478,7 @@ which exa >/dev/null && alias l='exa --icons' && alias ll='l --long --extended --git --all' -if which fd >/dev/null +if which fd >/dev/null 2>&1 then fn() { $(command -v fd || echo fdfind) --hidden --no-ignore-vcs --one-file-system "$@" | less -F; } # [F]ind [n]o ignore alias ff="noglob fn --color=always " # [F]ind [F]ile compdef ff=fd