2019-09-11 04:11:40 +02:00
|
|
|
# env
|
2022-03-20 05:13:00 +01:00
|
|
|
# Written in 2019-2020,2022 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
|
|
|
|
|
2020-08-26 04:24:01 +02:00
|
|
|
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"
|
|
|
|
|
2022-08-08 18:25:57 +02:00
|
|
|
if command -v nvi >/dev/null; then
|
2020-08-23 16:27:26 +02:00
|
|
|
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=
|
2022-08-08 18:25:57 +02:00
|
|
|
if command -v git >/dev/null && [ -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
|
2021-12-15 10:06:33 +01:00
|
|
|
OpenBSD)
|
|
|
|
# Seems it's just set in /etc/rc and isn't inherited by the shell.
|
|
|
|
stty status "^T"
|
|
|
|
;;
|
2020-08-22 02:01:38 +02:00
|
|
|
Linux)
|
|
|
|
stty erase "^?"
|
2019-09-11 04:11:40 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2022-08-08 18:25:57 +02:00
|
|
|
if command -v nncp-call >/dev/null; then
|
2022-03-20 05:13:00 +01:00
|
|
|
NNCPCFG=~/.config/nncp
|
|
|
|
export NNCPCFG
|
|
|
|
fi
|
|
|
|
|
2019-09-11 04:11:40 +02:00
|
|
|
set -o emacs
|