dotfiles/.bash_aliases
Victor Westerlund bea23e4341 fix: run l after cdl instead of ll (#5)
`cdl` is the "change dir and list" and `cdll` is "change dir and list hidden"

Reviewed-on: https://codeberg.org/vlw/dotfiles/pulls/5
2024-12-04 13:45:29 +00:00

34 lines
759 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"
# 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"
# 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"