Compare commits

...

10 Commits

4 changed files with 66 additions and 3 deletions

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Do nothing if not running an interactive shell
case $- in
*i*) ;;
@ -9,11 +11,14 @@ export TERM="xterm-256color"
export EDITOR="vi"
export VISUAL="vi"
export PATH="$PATH:$HOME/.local/bin/:$HOME/go/bin/"
export CDPATH=".:$HOME"
# The Prompt
export PS1='\u@\h:\W\$ '
export PS1='\[\e[38;2;161;161;0m\]\u\[\e[0m\]@\[\e[34m\]\h\[\e[0m\]:\[\e[32m\]\W\[\e[0m\]\$ '
# History settings
set -o history # Enable history
shopt -s histappend # Append to the history file instead of overwriting it
HISTCONTROL=ignoreboth # Don't put duplicate lines or lines beginning with a space in the history file
HISTSIZE=-1 # Don't limit the number of history lines stored
@ -21,7 +26,7 @@ HISTFILESIZE=-1 # Don't truncate the history when reading the history fil
# Pager settings
# Use lesspipe if it exists
if command -v lesspipe; then
if command -v lesspipe >/dev/null; then
export LESSOPEN="| $(command -v lesspipe) %s";
export LESSCLOSE="$(command -v lesspipe) %s %s";
fi
@ -53,3 +58,8 @@ set -o vi
# Aliases
source ~/.config/shell/aliasrc
# Functions
md() {
mkdir -p "$1" && cd "$1"
}

View File

@ -0,0 +1,32 @@
#!/bin/sh
# shell aliases
alias c="printf '\e[H\e[2J'" # printing control sequences is faster than "clear"
# vim aliases
alias v="vim"
# git aliases
alias gi="git init"
alias ga="git add"
alias gc="git commit"
alias gca="git commit -a"
alias gp="git push"
alias gd="git diff"
alias gs="git status"
alias gl="git log"
# docker aliases
alias d="docker"
# taskwarrior aliases
alias t="task"
# aliases for enabling color
alias ls="ls --human-readable --color=auto"
alias grep="grep --color=auto"
alias fgrep="fgrep --color=auto"
alias egrep="egrep --color=auto"
alias diff="diff --color=auto"
alias ip="ip --color=auto"

4
shell/.profile Normal file
View File

@ -0,0 +1,4 @@
# Load the ~/.bashrc file if we're using Bash
if test -n "$BASH_VERSION"; then
test -r "$HOME/.bashrc" && . "$HOME/.bashrc"
fi

17
vi/.exrc Normal file
View File

@ -0,0 +1,17 @@
" automatically indent new lines
set autoindent
" automatically write the current file when changing with multiple files open
set autowrite
" activate line numbers
set number
" turn on row and column position
set ruler
" show command and insert modes
set showmode
" set a tab to two spaces
set tabstop=2