dotfiles/.bash_profile

74 lines
2.1 KiB
Bash
Raw Permalink Normal View History

2022-01-03 05:33:05 -05:00
#!/bin/sh
2023-07-31 18:28:38 -04:00
# This tells the system what terminal you are using or emulating.
2022-01-03 05:33:05 -05:00
export TERM="xterm-256color"
# stty (Set TTY) sets up your TTY. Note, if you have problems with
# your backspace key, try changing the "erase '^h'" to "erase '^?'".
# If that still does not help, type stty erase at the shell prompt
# and then hit your backspace key.
stty erase '^?' echoe
2023-07-31 18:28:38 -04:00
# Strip exe from completion
2022-01-03 05:33:05 -05:00
shopt -s completion_strip_exe
2023-07-31 18:28:38 -04:00
# AutoCD up with '..'
shopt -s autocd
2022-01-03 05:33:05 -05:00
2023-07-31 18:28:38 -04:00
# Append history
#shopt -s histappend
#PROMPT_COMMAND="history -a;$PROMPT_COMMAND"
2022-01-03 05:33:05 -05:00
2023-07-31 18:28:38 -04:00
# Ignore list for filename completion
export FIGNORE=".dll:.cpl"
2022-01-03 05:33:05 -05:00
2023-07-31 18:28:38 -04:00
# Variables
2022-01-03 05:33:05 -05:00
export DISPLAY="localhost:0.0"
2023-07-31 18:28:38 -04:00
export EDITOR="nano"
export LANG="en_GB"
2022-01-03 05:33:05 -05:00
export LESS="-iRM"
2023-07-31 18:28:38 -04:00
export LYNX_CFG="~/.lynx/lynx.cfg"
export PATH="/usr/sbin:~/bin:$PATH:."
export TZ="Europe/Oslo"
2022-01-03 05:33:05 -05:00
# Aliases
2023-07-31 18:28:38 -04:00
alias bb="ssh -t tty.sdf.org bboard"
alias cd..="cd .."
alias cls="printf '\ec'" # Clear screen+scrollback
2022-01-03 05:33:05 -05:00
alias cp="cp -i"
2023-07-31 18:28:38 -04:00
alias cyg-get="/cygdrive/e/Install/Cygwin/setup-x86_64.exe -qn -P"
alias cyg-update="/cygdrive/e/Install/Cygwin/setup-x86_64.exe -qng"
2022-01-03 05:33:05 -05:00
alias del="rm -i"
2023-07-31 18:28:38 -04:00
alias dir="ls -la"
alias ga="git add -A"
alias gc="git commit"
2022-01-03 05:33:05 -05:00
alias gl="git log --oneline --all --graph --decorate"
2023-07-31 18:28:38 -04:00
alias grep="grep --color"
2022-01-03 05:33:05 -05:00
alias gs="git status"
alias gw="git whatchanged"
2023-07-31 18:28:38 -04:00
alias keychaininit="eval \$(keychain --eval)"
alias la="ls -la"
alias ll="ls -l"
alias ls="ls --color=auto --group-directories-first"
alias mv="mv -i"
alias npp="cygstart /cygdrive/d/bin/Notepad++/notepad++.exe"
2022-07-07 06:02:20 -04:00
alias pastebin="pb" # https://tildegit.org/tomasino/pb
2023-07-31 18:28:38 -04:00
alias rm="rm -i"
2022-07-07 06:02:20 -04:00
alias shn="pb -u"
2023-07-31 18:28:38 -04:00
alias start="cygstart"
alias sublime="cygstart /cygdrive/d/bin/Sublime/sublime_text.exe"
alias sudo="elevate -k" "$@" # https://code.kliu.org/misc/elevate/
2022-01-03 05:33:05 -05:00
2023-07-31 18:28:38 -04:00
# Git Prompt
2022-01-03 05:33:05 -05:00
source /usr/share/git-core/git-prompt.sh
2023-07-31 18:28:38 -04:00
export PS1='\n\033[32m\]\u@\h \[\033[33m\w\033[0m\]$(__git_ps1 " (%s)")\n\$ '
2022-01-03 05:33:05 -05:00
2023-07-31 18:28:38 -04:00
# Dircolors
2022-01-03 05:33:05 -05:00
#eval $(dircolors -b $HOME/.config/dircolors/dircolors.monokai)
# Keychain for SSH Agent
#eval $(keychain --eval)
# Greeting
echo "Welcome to the SDF Public Access UNIX system. (est. 1987)"
date -R