-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bashrc: Extract aliases.sh and prompt.sh
- Loading branch information
1 parent
f45905e
commit e0e5a8f
Showing
4 changed files
with
23 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
alias mv="mv -iv" | ||
alias cp="cp -riv" | ||
alias mkdir="mkdir -pv" | ||
alias ls="ls --color=auto --group-directories-first" | ||
alias nvim="nvim --startuptime /tmp/nvim-startuptime" | ||
alias open="xdg-open" | ||
|
||
alias gitprune="git --no-pager branch --format='%(refname:short)' | xargs -n1 -I{} git branch -d {} 2> /dev/null" | ||
# shellcheck disable=2154 | ||
alias gitfix="git diff --name-only | uniq | xargs \$EDITOR" | ||
alias screenshot='grim -g "$(slurp)"' | ||
alias podrun='podman run --rm --interactive --tty --volume "$(pwd)":/pwd --workdir /pwd' | ||
alias rga="rg --glob='*' --glob='!.git' --glob='!build'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CLR1="\[$(tput setaf 16)\]" | ||
CLR2="\[$(tput setaf 17)\]" | ||
RESET="\[$(tput sgr0)\]" | ||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then | ||
PS1="$CLR1\u@\h $CLR2\A \$? $CLR1\W $CLR2\$$RESET " | ||
else | ||
PS1="$CLR1\u $CLR2\A \$? $CLR1\W $CLR2\$$RESET " | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters