etc/dot/file/profile
2023-08-24 12:48:59 +03:00

60 lines
1.4 KiB
Bash
Executable file

#!/bin/sh
# k1574's profile.
export_loop(){
# Chore, because I'm lazy to type "export" so many times.
# Standard "export" command takes arguments
# from variables from the start, but I want to
# use other variables in definition for next of them.
while test ! -z "$1" ; do
# Doing until we have arguments.
value="$(eval echo $2)"
name="$1"
export "$name"="$value"
shift 2
done
}
# Standard variables.
export_loop \
ENV '$HOME/.shrc' \
PROMPT '"; "' \
PS1 '"$PROMPT"' \
SUDO_PROMPT '"# "' \
PATH '$HOME/exe:$HOME/.local/bin:$PATH' \
EDITOR '`goblin useprog vim vi ed`' \
VISUAL '$EDITOR' \
GIT_EDITOR '$VISUAL' \
PAGER '`goblin useprog less more`' \
MANPAGER '$PAGER' \
\
CDHIST '$HOME/lib/cds' \
CDHISTMAX '50' \
\
CMDHIST '$HOME/lib/cmds' \
CMDHISTMAX '100' \
PROFILE '$HOME/.profile' \
ENVDIR '$HOME/env' \
SETENV '$HOME/lib/setenv/sh' \
LOGIN '$HOME/lib/login/sh' \
INDENT '" "'\
\
GOPATH '$HOME/app/go' \
GOBIN '$HOME/exe'\
COMPOSEREXE '$HOME/lib/composer/vendor/bin' \
XDG_UTILS_DEBUG_LEVEL '3'\
XDG_CONFIG_HOME '$HOME/lib' \
XDG_RUNTIME_DIR '$HOME/tmp' \
XDG_DATA_HOME '$HOME/lib/xdg' \
XCOMPOSEFILE '$HOME/lib/xcompose' \
ANDROID_NDK_HOME '$HOME/app/android/ndk' \
GIT 'https://github.com/$USER' \
PERSONAL_SHELL 'sh' \
MYVIMRC '$HOME/.vimrc'\
test -r $SETENV && . "$SETENV" && setenv profile
test -r $HOME/lib/script/lf.sh && . $HOME/lib/script/lf.sh
export GPG_TTY=$(tty)
export SSH_TTY=$(tty)