env/dotfiles/shrc

68 lines
1.3 KiB
Plaintext
Raw Normal View History

2019-09-11 04:11:40 +02:00
# env
2020-08-22 02:01:38 +02:00
# Written in 2019-2020 by Lucas
2019-09-11 04:11:40 +02:00
# CC0 1.0 Universal/Public domain - No rights reserved
#
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any
# warranty. You should have received a copy of the CC0 Public Domain
# Dedication along with this software. If not, see
# <http://creativecommons.org/publicdomain/zero/1.0/>.
\unalias -a
EDITOR=ed
PAGER=less
VISUAL=ed
export EDITOR PAGER VISUAL
GPG_TTY=$(tty)
export GPG_TTY
SEKRIT_GPG_ID=sekrit_key
export SEKRIT_GPG_ID
2019-09-11 04:11:40 +02:00
alias cp="cp -i"
alias l="ls -F"
alias la="ls -aF"
alias ll="ls -lF"
alias mv="mv -i"
alias p="$PAGER"
2020-08-23 16:27:26 +02:00
if command -v nvi >/dev/null 2>&1; then
alias vi=nvi
fi
2019-09-11 04:11:40 +02:00
if [ -d ~/local/man ]; then
alias man="/usr/bin/man -m ~/local/man"
fi
2020-07-09 23:52:40 +02:00
if [ -d ~/local/libdata/perl5/site_perl ]; then
PERL5LIB=~/local/libdata/perl5/site_perl
export PERL5LIB
fi
2019-12-09 12:03:41 +01:00
PS1=
if command -v git >/dev/null 2>&1 && [ -f ~/code/lucas/env/utils/shgit ]; then
2019-12-09 12:03:41 +01:00
. ~/code/lucas/env/utils/shgit
export PS1='$(shgit)'
fi
2019-09-11 04:11:40 +02:00
case $SHELL in
/bin/mksh)
2019-12-09 12:03:41 +01:00
PS1=$PS1'${HOSTNAME:=$(hostname -s)}\$ '
2019-09-11 04:11:40 +02:00
;;
2020-08-22 02:01:38 +02:00
*)
PS1=$PS1'\h\$ '
2019-09-11 04:11:40 +02:00
;;
esac
export PS1
case $(uname -s) in
2020-08-22 02:01:38 +02:00
Linux)
stty erase "^?"
2019-09-11 04:11:40 +02:00
;;
esac
set -o emacs