News for hackers. Stuff that matters.

catcar

Re:Ask HN: Best things in your bash_profile/aliases? on Monday January 14, 2019 @09:39AM (#18903252)

  unameOut="$(uname -a)"

  case "${unameOut}" in

	*Microsoft*) machine="WSL";;

	Linux*)      machine=Linux;;

	Darwin*)     machine=Mac;;

	CYGWIN*)     machine=Cygwin;;

	MINGW*)      machine=MinGw;;

	*)           machine="UNKNOWN:${unameOut}"

  esac

  unset unameOut

  PROMPT_COMMAND='echo -ne "\033]0;[${machine}] ${USER}@${HOSTNAME}: ${PWD}\007"'
Those shoes were actually great: https://patents.google.com/patent/US5588227