#!/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 '^h' 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 GREP_COLORS='ms=30;43' # ANSI Black;Yellow export HISTCONTROL='ignoreboth:erasedups' export LANG='en_US.UTF-8' export LESS='-iRM' export LYNX_CFG='~/.config/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 if [[ "$(uname)" == *"CYGWIN"* ]]; then shopt -s completion_strip_exe alias start='cygstart' alias cyg-get='cygstart /e/Install/Cygwin/setup-x86_64.exe -qn -P' alias cyg-update='cygstart /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='gsudo' # github.com/gerardog/gsudo fi # Aliases alias cd..='cd ..' alias cls='clear' 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' alias grep='grep --color --ignore-case' alias start-ssh-agent='eval $(keychain --eval)' # 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