Here's mine:My bash_aliases:
Code:
## Added Options ##export LC_ALL=en_US.UTF-8export LANG=en_US.UTF-8export LANGUAGE=en_US.UTF-8# Powerline # Powerline is a statusline plugin # https://github.com/powerline/powerline#. /usr/share/powerline/bindings/bash/powerline.sh# Midnight Commander# GNU Midnight Commander is a visual file manager# https://midnight-commander.org/. /usr/lib/mc/mc.sh# ibus-typing-booster# Description: Completion input method to speedup typing# https://mike-fabian.github.io/ibus-typing-booster/documentation.html#adding-to-desktop export GTK_IM_Module=ibus export XMODIFIERS=@im=ibus export QT_IM_Modules=ibus# thefuck https://github.com/nvbn/thefuck# Description: spelling corrector of console commands# eval $(thefuck --alias)# You can use whatever you want as an alias, like for Mondays:# eval $(thefuck --alias FUCK)# Experimental mode https://github.com/nvbn/thefuck#experimental-instant-mode# eval $(thefuck --alias --enable-experimental-instant-mode)# fzf https://github.com/junegunn/fzf# fzf is a general-purpose command-line fuzzy finder# Info /usr/share/doc/fzf/README.Debian# Enable fzf keybindings for Bash source /usr/share/doc/fzf/examples/key-bindings.bash# Enable fuzzy auto-completion for Bash (Not needed on Debian)# source /usr/share/doc/fzf/examples/completion.bash# Fix PATHPATH=$PATH:/home/craig/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/craig/.local/bin:# fzf-tab-completion: Tab completion using fzf# https://github.com/lincheney/fzf-tab-completionsource /home/craig/fzf-tab-completion/bash/fzf-bash-completion.shbind -x '"\t": fzf_bash_completion'# Additional key bindings for fzf, primarily Bash.# https://github.com/atweiden/fzf-extras[[ -e "$HOME/.fzf-extras/fzf-extras.sh" ]] \ && source "$HOME/.fzf-extras/fzf-extras.sh" #Shellfirm https://github.com/kaplanelad/shellfirm# Source our file at the end of our bash profile (e.g. ~/.bashrc, ~/.profile, or ~/.bash_profile)#echo '[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh' >> ~/.bashrc# Load pre-exec command on shell initialized#echo 'source ~/.shellfirm-plugin.sh' >> ~/.bashrc[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.shsource ~/.shellfirm-plugin.sh[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.shexport NVM_DIR="$HOME/.nvm"[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion. "$HOME/.cargo/env"source ~/.bash_completion/alacrittysource ~/.bash_completion/rustupsource ~/.bash_completion/cargo# walk https://github.com/antonmedv/walkfunction lk { cd "$(walk "$@")"}### Added by surfraw. To remove use surfraw-update-path -removeexport PATH=$PATH:/usr/lib/surfraw### End surfraw addition.alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg". /usr/share/bash-completion/completions/quiltcomplete -F _quilt_completion -o filenames dquilt#Zoxide https://github.com/ajeetdsouza/zoxide?tab=readme-ov-fileeval "$(zoxide init bash)"
Code:
# Start gomuks Matrix Client#alias gomuks=/home/craig/.local/bin/gomuks-linux-arm64# ls command with a lot of pretty colors# https://github.com/lsd-rs/lsdalias ls='lsd'# walk: Terminal File Manager# https://github.com/antonmedv/walk alias walk="walk --icons"# Weather:https://github.com/chubin/wttr.inalias weather="/home/craig/.local/bin/weather.sh"# Onelinershell https://github.com/Onelinerhub/shellhub# alias oh="/home/craig/.local/bin/oh.sh"# Show open portsalias ports='sudo netstat -tulanp'# Refresh .bashrcalias bashrc="source ~/.bashrc"# become root #alias root='sudo -i'alias su='sudo su'# Fix whichalias which='command -v'# APT User Commandsalias search='apt search'alias file='apt-file search'alias policy='apt policy'alias show="nala show"# if user is not root, pass all commands via sudo #if [ $UID -ne 0 ]; thenalias update='sudo apt update'alias ainstall='sudo apt install'alias apurge='sudo apt purge -y --autoremove'alias upgrade='sudo nala upgrade'alias aremove='sudo apt autoremove -y'alias clean='sudo nala clean'alias reboot='sudo reboot'alias shutdown="sudo shutdown -P now"fi# Handy-dandy aliases for journalctl and systemctlalias jc='sudo journalctl -b'alias jca='sudo journalctl'alias jcf='sudo journalctl -f'alias jcr='sudo journalctl --list-boots'alias sc='sudo systemctl'# Making files immortal & executablealias im+="sudo chattr +i"alias im-="sudo chattr -i"alias exe="sudo chmod +x"#Add safety nets# do not delete / or prompt if deleting more than 3 files at a time #alias rm='rm -I --preserve-root'# confirmation #alias mv='mv -i'alias cp='cp -i'alias ln='ln -i'# Parenting changing perms on / #alias chown='chown --preserve-root'alias chmod='chmod --preserve-root'alias chgrp='chgrp --preserve-root'# copy the current working directory to the clipboardalias cpwd='pwd | xclip -selection clipboard'# Clipboardalias cpy="xclip -selection clipboard"# quick directory movementalias ..='cd ..'alias ...='cd ../..'alias ....='cd ../../..'# go to the last directory you were inalias back='cd $OLDPWD'# quickly find files and directoryalias ff='find . -type f -name'alias fd='find . -type d -name'# Create Python virtual environmentalias ve='python3 -m venv --system-site-packages ./venv'alias va='source /home/craig/Projects/venv/bin/activate'#alias va='source ./venv/bin/activate'# Ping Commands# Stop after sending count ECHO_REQUEST packets #alias ping='ping -c 5'alias pg="ping google.com -c 5"# alias shortcutsalias rpi="sudo rpi-update"alias rpi-next="sudo SKIP_BOOTLOADER=1 rpi-update next"alias raspi="sudo raspi-config"alias clr="clear"alias clrh="history -c -w ~/.bash_history"alias df='df -H'alias du='du -ch'alias mk="mkdir -p"alias loading="sudo dmesg > ~/dmesg.txt"# ls Commands## Colorize the ls output and human readable sizes ### alias ls='ls --color=auto --human-readable -al'## Use a long listing format ### alias ll='ls -la'## Show hidden files ### alias l.='ls -d .* --color=auto'# Listing files in folder# alias listkb="ls -l --block-size=K"# alias listmb="ls -l --block-size=M"## Colorize the grep command output for ease of use (good for log files)##alias grep='grep --color=auto'alias egrep='egrep --color=auto'alias fgrep='fgrep --color=auto'# Colorize diff outputalias diff='colordiff'# Start calculator with math supportalias bc="bc -l"# Resume wget by defaultalias wget="wget -c"# ps Commandsalias ps="ps auxf"# Get top process eating cpualias pscpu="ps auxf | sort -nr -k 3"alias pscpu10="ps auxf | sort -nr -k 3 | head -10"# Get top process eating memoryalias psmem='ps auxf | sort -nr -k 4'alias psmem10='ps auxf | sort -nr -k 4 | head -10'# Free and Used Ramalias meminfo='free -l'alias free='free -mt'# Run top in alternate screenalias top='tput smcup; top; tput rmcup'
Statistics: Posted by craigevil — Sun Oct 27, 2024 12:22 am — Replies 1 — Views 41