mirror of
https://codeberg.org/vlw/dotfiles.git
synced 2025-09-13 19:03:40 +02:00
39 lines
891 B
Bash
39 lines
891 B
Bash
# Make dir and cd into it
|
|
mkcdir () {
|
|
mkdir -p -- "$1" &&
|
|
cd -P -- "$1"
|
|
}
|
|
|
|
# ls -la
|
|
alias l="ls -lh"
|
|
alias ll="ls -lah"
|
|
alias lll="ls -lah | less"
|
|
|
|
# cd +
|
|
cdl () {
|
|
cd -P -- "$1" &&
|
|
l
|
|
}
|
|
|
|
cdll () {
|
|
cp -P -- "$1" &&
|
|
ll
|
|
}
|
|
|
|
# Create standard git WIP commit with timestamps
|
|
alias gitwip="git commit -m \"wip: $(date +%Y-%m-%dT%H:%M:%S%z) ($(date +%s))\""
|
|
# Remove dropped upstream git branches from remote
|
|
alias gitclear="git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D"
|
|
# Shorthand git pull origin
|
|
alias gitp="git pull origin"
|
|
# Shorthand git status"
|
|
alias gits="git status"
|
|
|
|
# Generate random 16byte HEX
|
|
alias rng16="head -c 16 /dev/random | xxd -p"
|
|
|
|
# Kill VSCode processes
|
|
alias killvscode="ps uxa | grep .vscode-server | awk '{print $2}' | xargs kill -9"
|
|
|
|
# Change PHP CLI binary
|
|
alias chphp="sudo update-alternatives --config php"
|