81 lines
2.1 KiB
Bash
Executable File
81 lines
2.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# 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
|
|
|
|
# Shell options
|
|
shopt -s autocd # AutoCD up with ..
|
|
shopt -s histappend # Append history
|
|
|
|
# Path
|
|
export PATH="/usr/sbin:~/bin:$PATH:."
|
|
|
|
# Set stricter umask
|
|
umask 0077
|
|
|
|
# Vars
|
|
export DISPLAY="localhost:0.0"
|
|
export EDITOR="nano"
|
|
export FIGNORE=".dll:.cpl"
|
|
export HISTCONTROL=ignoreboth:erasedups
|
|
export LANG="en_US.UTF-8"
|
|
export LESS="-iRM"
|
|
export LESSHISTFILE=-
|
|
export LYNX_CFG="~/.lynx/lynx.cfg"
|
|
export TERM="xterm-256color"
|
|
export TZ="Europe/Oslo"
|
|
|
|
# Dircolors
|
|
#eval $(dircolors -b $HOME/.config/dircolors/dircolors.monokai)
|
|
|
|
# Functions
|
|
#shn() { curl -F "shorten=$1" "https://envs.sh"; }
|
|
|
|
# Cygwin specific
|
|
shopt -s completion_strip_exe
|
|
alias start="cygstart"
|
|
alias cyg-get="/e/Install/Cygwin/setup-x86_64.exe -qn -P"
|
|
alias cyg-update="/e/Install/Cygwin/setup-x86_64.exe -qng"
|
|
alias npp="cygstart /d/bin/Notepad++/notepad++.exe"
|
|
alias sublime="cygstart /d/bin/Sublime/sublime_text.exe"
|
|
alias sudo="elevate -k" "$@" # https://code.kliu.org/misc/elevate/
|
|
alias bb="ssh -t tty.sdf.org bboard"
|
|
|
|
# Aliases
|
|
alias cd..="cd .."
|
|
alias cls="clear"
|
|
alias grep="grep --color"
|
|
alias start-keychain="eval \$(keychain --eval)"
|
|
alias ls="ls --color=auto --group-directories-first"
|
|
alias dir="ls -l"
|
|
alias ll="ls -l"
|
|
alias la="ls -la"
|
|
alias cp="cp -i"
|
|
alias mv="mv -i"
|
|
alias rm="rm -i"
|
|
|
|
# Git Aliases
|
|
alias ga="git add -A"
|
|
alias gc="git commit"
|
|
alias gh="git hist"
|
|
alias gl="git log --oneline --all --graph --decorate --color"
|
|
alias gs="git status"
|
|
alias gw="git whatchanged"
|
|
|
|
# Git Prompt
|
|
if [[ -e /usr/share/git-core/git-prompt.sh ]]; then
|
|
source /usr/share/git-core/git-prompt.sh
|
|
export PS1='\n\[\033[32m\]\u@\h \[\033[33m\w\033[0m\]$(__git_ps1 " (%s)")\n\$ '
|
|
else
|
|
export PS1='\n\[\033[32m\]\u@\h \[\033[33m\w\033[0m\]\n\$ '
|
|
fi
|
|
|
|
# Keychain for SSH Agent
|
|
#eval $(keychain --eval)
|
|
|
|
# Greeting
|
|
echo "Welcome to the SDF Public Access UNIX system. (est. 1987)"
|
|
date -R
|