my dotz
1#!/bin/sh
2
3PS1='$(prompt) \$ '
4
5
6# this is a story all about how
7# history control in bash sucks
8HISTFILE=~/.sh_eternal_history
9HISTSIZE=
10HISTCONTROL=ignoredups:erasedups
11shopt -s histappend
12
13# # reload history on every prompt invocation
14# PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
15
16# extend pa for git stuffs
17# meh i don't like this at all tbh
18pa() {
19 case $1 in
20 g)
21 cd "${PA_DIR:=${XDG_DATA_HOME:=$HOME/.local/share}/pa}"
22 git pull
23 git add --all
24 git commit -m '*'
25 git push
26 cd -
27 ;;
28
29 *)
30 command pa "$@"
31 ;;
32 esac
33}
34
35if ls --version 2>&1 | grep -iE "gnu|busybox" > /dev/null; then
36 alias ls='ls --color=auto '
37fi
38
39if [ -z "${SSH_AGENT_PID}" ]
40then
41 if ! [ -e /tmp/ssh-agent-$USER ]
42 then
43 ssh-agent 2>/dev/null >/tmp/ssh-agent-$USER
44 fi
45 . /tmp/ssh-agent-$USER >/dev/null
46fi
47
48if [ "$TERM" = "foot" ]; then
49 alias ssh='TERM=xterm-256color ssh'
50fi