Remove unused functionality from bashrc

This commit is contained in:
Tony Grosinger 2020-04-10 19:58:10 -07:00
parent 39806eae31
commit 9758e647fb

43
.bashrc
View File

@ -20,8 +20,6 @@ shopt -s histappend
# Applications
alias tmux="tmux -2"
alias grep="grep --color=auto"
alias extract="tar xvf"
alias df="df -h"
# Fix gpg signing
# https://github.com/keybase/keybase-issues/issues/2798
@ -30,9 +28,6 @@ export GPG_TTY=$(tty)
# Golang
export PATH=$PATH:/usr/local/go/bin:${HOME}/go/bin
# VPN
alias connect="sudo openvpn --config $HOME/home.ovpn"
# enable bash completion in interactive shells
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
@ -41,17 +36,12 @@ fi
export TERM="xterm-256color"
export EDITOR=$(which vim)
# Adding applications to path
if [[ -d ${HOME}/bin ]];
then
export PATH=$PATH:${HOME}/bin
fi
# Computer information & control
alias df="df -h"
alias suspend="sudo pm-suspend"
# Add a local un-tracked bash-rc if present
if [[ -f ${HOME}/.bashrc_local ]];
then
@ -98,39 +88,6 @@ function fn() {
fi
}
# (f)ind by (b)ody
# usage: fb foo
# to find all files containing 'foo' in the body.
#
# usage: fb foo txt
# to find all files ending in '.txt' containing 'foo' in the body.
function fb() {
if [ $# -eq 2 ]; then
grep -r --include="*.$2" $1
elif [ $# -eq 1 ]; then
grep -r "$1"
else
echo "(f)ind by (b)ody"
echo "usage: fb [query] [extension]"
echo "Where query is the string to search for and extension is optional restriction on what files to search"
fi
}
# wificonnect
# usage: wificonnect <ssid> <password>
# Connects the computer to the provided network
# Assumes the network interface is wlan0
function wificonnect() {
if [ $# -ne 2]; then
echo "wificonnect"
echo "usage: wificonnect <ssid> <password>"
else
nmcli d wifi connect $1 password $2 iface wlan0
fi
}
# Prompt Related Helpers
# Add color shortcuts
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset=`tput sgr0`