From Fedora Project Wiki

Oh my Bash!!!

On this sub-page, I will share my favorite bash setup

Git graph

I use various source code control and I like git!. Want to see the how code evolve and checking the log? This is my favorite alias:

alias gitgraph="git log --graph --date-order --date=format:'%d/%m/%y' --pretty=format:'%C(auto)%h%d %C(reset)%s %C(bold blue)%ce %C(reset)%C(green) (%cd)'"



This is how I set proxy on my terminal via bash. I have 2 function setproxy and unsetproxy. For example, Here I how I do to set proxy to my university network. Both function also will setup/reset my git config

## set proxy (BASH only not systemwide)
function setproxy() {
	export NO_PROXY='localhost,,::1,*'
	export no_proxy='localhost,,::1,*'
	export {http,https,ftp}_proxy=''

	gsettings set org.gnome.system.proxy mode 'manual'
	gsettings set org.gnome.system.proxy.ftp host ''
	gsettings set org.gnome.system.proxy.ftp port 8080
	gsettings set org.gnome.system.proxy.https host ''
	gsettings set org.gnome.system.proxy.https port 8080
	gsettings set org.gnome.system.proxy.http host ''
	gsettings set org.gnome.system.proxy.http port 8080

	gnome-terminal -x bash -c "git config --global http.proxy \"\""

	echo -e "Proxy environment variable has been setup!"

function unsetproxy() {
	unset {http,https,ftp}_proxy
	unset no_proxy
	unset NO_PROXY

	gsettings set org.gnome.system.proxy mode 'none' 

	gnome-terminal -x bash -c "git config --global http.proxy \"\""

	echo -e "Proxy environment variable removed."