You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Song Zheng edited this page Mar 29, 2025
·
3 revisions
Bash scripts
# Productivity Alias
alias .="ls"
alias ..="cd .."
# TMUX shortcuts
alias tls="tmux ls"
ta() {
tmux attach -t "$1"
}
# https://ostechnix.com/bash-tips-how-to-cd-and-ls-in-one-command/
# ld path will run cd and ls
ld() {
local dir="$1"
local dir="${dir:=$HOME}"
if [[ -d "$dir" ]]; then
cd "$dir" >/dev/null; ls --color=auto
else
echo "bash: cdls: $dir: Directory not found"
fi
}