Files
dotfiles/common/.config/shell/aliases.sh
Pratik Tripathy 445ba576ca Template files created
- Gitignore and Prettierrc
- Created 2 env variables pointing to them

Shellcheck & Shellharden suggestions Implemented

NeoVim
- Replaced tpope/vim-surround with kylechui/nvim-surround
- LuaSnip typo fix
- [Ctrl+p] to open file fzf
- Formatting
2024-03-06 16:01:37 +05:30

47 lines
1.2 KiB
Bash

#!/bin/sh
# Generic
alias bashreload="source ~/.bashrc"
alias zshreload="source ~/.zshrc"
alias free="free -ht"
alias type="type -a"
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias usersearch="awk -F: '{print \"UserName: \" \$1 \", UserID: \" \$3 \", Home Dir: \" \$6 \", Shell Used: \" \$7}' /etc/passwd | grep"
alias untar='tar -zxvf '
alias wget='wget --hsts-file ${WGET_HSTS_FILE}'
alias v='$EDITOR'
alias snvim='${HOMEBREW_PREFIX}/bin/nvim' # Stable nvim
# Directories and Directory listings
alias ~="cd ~"
alias ..="cd .."
alias ...='cd ../../../' # Go back 3 directory levels
alias cl=clear
alias lsc='ls --color=auto --hyperlink'
alias ll='lsc -alhF'
alias la='lsc -Ah'
alias lsa="lsc -lAFhZ"
alias mkdir="mkdir -pv"
alias df="df -h"
mkcd() {
mkdir "$1"
cd "$1" || exit
}
# Network
alias ping="ping -c 10"
alias ping8="ping 8.8.8.8"
alias ping1="ping 1.1.1.1"
alias p8="ping8"
alias p1="ping1"
alias pubip="curl https://ipinfo.io/ip; echo"
alias speedtest="speedtest-cli --secure"
geoip() {
curl -s https://ipinfo.io | sed '/readme\|loc\|postal\|{\|}\|hostname/d;s/org/ISP/;s/"\|,$//g' | awk -F ':' 'NF { printf("%10s: %s \n", $1, $2)}'
}