66 lines
1.4 KiB
Bash
Executable file
66 lines
1.4 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Profile of Surdeus.
|
|
|
|
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 -n "$1" ; do
|
|
# Doing until we have arguments.
|
|
value="$(eval echo $2)"
|
|
name="$1"
|
|
export "$name"="$value"
|
|
shift 2
|
|
done
|
|
}
|
|
|
|
if test "$OS" != "Windows_NT" ; then
|
|
PATH="$HOME/exe:$HOME/.local/bin:$PATH"
|
|
fi
|
|
# Standard variables.
|
|
export_loop \
|
|
ENV '$HOME/.shrc' \
|
|
PROMPT '"; "' \
|
|
PS1 '"$PROMPT"' \
|
|
SUDO_PROMPT '"# "' \
|
|
EDITOR '`bb which vim vi ed`' \
|
|
VISUAL 'bb which nvim-qt $EDITOR' \
|
|
GIT_EDITOR '$VISUAL' \
|
|
PAGER '`bb which 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' \
|
|
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
|
|
|
|
# Visual editor.
|
|
if which bb ; then
|
|
ve() {
|
|
`bb which nvim vim vi` $@
|
|
}
|
|
fi
|
|
|
|
export GPG_TTY=$(tty)
|
|
export SSH_TTY=$(tty)
|
|
|