opt-jimlab/bashrc

42 lines
964 B
Bash

# List
alias l="ls -lhF --color=always"
# Long list
alias ll="ls -AlhF --color=always"
# Make and change directory
mcd() {
mkdir -p "$1" && cd "$1"
}
# Change directory list
cdl() {
cd "$1" && ls -lhF --color=always
}
# Change directory long list
cdll() {
cd "$1" && ls -AlhF --color=always
}
# Aliases for Python venv management.
alias activate="source .venv/bin/activate"
alias mkvenv="python3 -m venv .venv"
# Aliases for common podman/podman compose tasks.
alias pcupd="podman-compose up -d"
alias pcdown="podman-compose down"
alias pps="podman ps"
alias ccedit="nano container-compose.yaml"
# Enables an NGINX site by linking it from /etc/nginx/sites-available to /etc/nginx/sites-enabled.
nginx-enable(){
sudo ln -s "/etc/nginx/sites-available/$1.conf" "/etc/nginx/sites-enabled/$1.conf"
}
# Disables an NGINX site by removing the entry in /etc/nginx/sites-enabled.
nginx-disable(){
sudo rm "/etc/nginx/sites-enabled/$1.conf"
}