scre.git

env.sh

espurr
#!/bin/sh
# env - shell environment
# Copyright (C) 2022-2024 ArcNyxx <me@arcnyxx.net>
# see LICENCE file for licensing information

alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias ls='ls -A --color=auto'
alias sd='poweroff'

_PS1() {
	echo -n "\033[1m\033[34m$PWD\033[m "

	GITB=`git branch --show-current 2>/dev/null`
	[ $? -eq 0 ] && echo -n "($GITB) "

	if [ $1 -ge 129 -a $1 -le 160 ] ; then
		echo -n "\033[1m\033[31m[SIG`kill -l $1`]\033[m "
	elif [ $1 -ne 0 ] ; then
		echo -n "\033[1m\033[31m[$1]\033[m "
	fi

	echo -n "\$ "
}

PS1='`_PS1 $?`'