mirror of
https://codeberg.org/vlw/dotfiles.git
synced 2025-09-13 19:03:40 +02:00
chore: clean up aliases and add section comments
This commit is contained in:
parent
d7c6d4c783
commit
d4f2feabce
1 changed files with 22 additions and 14 deletions
|
@ -1,7 +1,11 @@
|
|||
# Make dir and cd into it
|
||||
mkcdir () {
|
||||
mkdir -p -- "$1" && cd -P -- "$1"
|
||||
}
|
||||
# Change PHP CLI binary
|
||||
alias phpa="sudo update-alternatives --config php"
|
||||
# Kill all code-server processes. Sometimes it hangs on startup
|
||||
alias kvscode="ps uxa | grep .vscode-server | awk '{print $2}' | xargs kill -9"
|
||||
|
||||
# +-------------------+
|
||||
# | Directory & Files |
|
||||
# +-------------------+
|
||||
|
||||
# Preview contents of a file or list the contents of a directory
|
||||
l () {
|
||||
|
@ -45,6 +49,15 @@ cdll () {
|
|||
cp -P -- "$1" && ll
|
||||
}
|
||||
|
||||
# Make a new directory and cd into it
|
||||
mkcdir () {
|
||||
mkdir -p -- "$1" && cd -P -- "$1"
|
||||
}
|
||||
|
||||
# +-----+
|
||||
# | Git |
|
||||
# +-----+
|
||||
|
||||
# Short-hands for various git functions
|
||||
gitf () {
|
||||
case "$1" in
|
||||
|
@ -84,19 +97,14 @@ gitf () {
|
|||
esac
|
||||
}
|
||||
|
||||
# +-----+
|
||||
# | SSH |
|
||||
# +-----+
|
||||
|
||||
# SSH to machine in debug mode at local.vlw.se
|
||||
sshl () {
|
||||
# Set login name from first argument or default to current user
|
||||
local user="${1:-$(whoami)}"
|
||||
|
||||
ssh -p 2222 "$user"@local.vlw.se
|
||||
}
|
||||
|
||||
# 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"
|
||||
}
|
Loading…
Add table
Reference in a new issue