Compare commits
10 Commits
a179516351
...
b9d5233943
Author | SHA1 | Date |
---|---|---|
The Magician | b9d5233943 | |
The Magician | 9ea9fdd5ec | |
The Magician | 14749b0a37 | |
The Magician | c0743ea749 | |
The Magician | 38030df570 | |
The Magician | a14eb5317c | |
The Magician | 0c18e7fe6d | |
The Magician | e8c7d4a775 | |
The Magician | 9319931386 | |
The Magician | 88b690d0f0 |
16
bash/.bashrc
16
bash/.bashrc
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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"
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue