Created
November 1, 2022 06:03
-
-
Save hylowaker/924dedd7813175e31c30fb09970b7b16 to your computer and use it in GitHub Desktop.
My custom .bashrc for WSL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Custom PATH | |
#PATH="/home/hylw/bin:/home/hylw/.local/bin/:$PATH" | |
PATH="$PATH:/mnt/c/Users/jH/AppData/Local/Programs/Microsoft VS Code/bin" | |
export PATH | |
# Ctrl+S | |
[[ $- == *i* ]] && stty -ixon | |
# less | |
export LESS='-R --mouse --wheel-lines=3' | |
# Custom Alias | |
alias k='kubectl' | |
alias p='/mnt/c/Windows/explorer.exe .' | |
# list ssh hosts | |
alias ssh-hosts="pcregrep -M \"^Host .+\n +HostName.+\n\" $HOME/.ssh/config | sed ':a;N;\$!ba;s/Host //gi;s/\\n HostName / : /gi'" | |
# Custom Var | |
export WINLOCAL=$(grep -oP "(?<=nameserver ).+" /etc/resolv.conf) | |
# kubectl auto completion | |
source <(kubectl completion bash) | |
complete -F __start_kubectl k | |
# aws cli auto completion | |
complete -C '/usr/local/bin/aws_completer' aws |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment