Skip to content

Instantly share code, notes, and snippets.

@williscool
Last active April 27, 2018 01:20
Show Gist options
  • Save williscool/2410618 to your computer and use it in GitHub Desktop.
Save williscool/2410618 to your computer and use it in GitHub Desktop.
my general bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# enable forward search
# http://ruslanspivak.com/2010/11/25/bash-history-incremental-search-forward/
# https://bugs.launchpad.net/ubuntu/+source/bash/+bug/80635/comments/12
stty -ixon
# User specific aliases and functions
source ~/git-completion.bash
alias celar='clear'
export EDITOR=vim
alias ls='ls -GphF'
## keep appending history and sync it will all terminal sessions
shopt -s histappend
export PROMPT_COMMAND="history -a"
unset HISTSIZE
unset HISTFILESIZE
# tbh im not using the vim keybinding in bash its just too much mental overhead lol
### setup bash vi mode for vim keybindings
##set -o vi
### keep ctrl l working with vim mode
# https://unix.stackexchange.com/questions/104094/is-there-any-way-to-enable-ctrll-to-clear-screen-when-set-o-vi-is-set
###bind -m vi-insert "\C-l":clear-screen
@williscool
Copy link
Author

Bash Prompt Decorating

generic basic prompt

PS1="[\u@\h:\w]$\[\033[0m\] "

@williscool
Copy link
Author

Check this out next time you are messing around with bash

https://news.ycombinator.com/item?id=16084763

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment