Files
dev_prod/10x_alias.sh
Pratik Tripathy ca49dcafc2 README.MD typo fix
Aliases
- Moved to appropriately named file
- Added aliases for copying git-template and prettier-template
- Fix to git_push_all_changes function

Nvims
- Compacted the function

Project Access
- pnew() updated to clone remore repo or create a new one from scratch depending on options provided
2024-03-06 16:09:39 +05:30

32 lines
1.1 KiB
Bash

#!/bin/sh
# Git
git_push_all_changes() {
if [ "$1" = "" ]; then
echo "Please provide a commit message."
return 126
fi
git add . && git commit -am "${1}" && git push
}
alias git_just_push=git_push_all_changes
alias cd_root='cd $(git rev-parse --show-toplevel 2>/dev/null || echo ".")'
alias cd_git_root=cd_root
[ ! -f "$GITIGNORE_TEMPLATE" ] || alias cpgi='cp ${GITIGNORE_TEMPLATE} .'
# Tmux
command -v tmux >/dev/null && alias ta="tmux a"
command -v tmux >/dev/null && alias tat="tmux a -t"
command -v tmux >/dev/null && alias tls="tmux ls"
command -v tmux >/dev/null && alias tnew="tmux new"
command -v tmux >/dev/null && alias tnewt="tmux new -t"
command -v eza >/dev/null && alias ls="eza --hyperlink --header --git -M --icons=auto --color=never"
alias ll='ls -alhF'
alias la='ls -Ah'
alias lsa="ls -lAFhZ"
alias path="printenv | grep ^PATH= | sed 's/^PATH=//' | tr ':' '\n'"
command -v fzf >/dev/null && alias path="printenv | grep ^PATH= | sed 's/^PATH=//' | tr ':' '\n' | fzf"
[ ! -f "$PRETTIER_TEMPLATE" ] || alias cpprc='cp ${PRETTIER_TEMPLATE} .'