Add bash files
This commit is contained in:
44
bashrc.d/aliases.bash
Normal file
44
bashrc.d/aliases.bash
Normal file
@@ -0,0 +1,44 @@
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
alias ls='ls --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
fi
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -l'
|
||||
alias la="ls -a"
|
||||
alias lS="ls -lSr"
|
||||
alias lm="ls -ltr $HOME/mail/ | tail"
|
||||
alias ..="cd .."
|
||||
alias install="apt-get install"
|
||||
alias m='MUTTJOBS=$(jobs | grep mutt) ; if [ -z "$MUTTJOBS" ] ; then echo "No mutt, starting new" ; mutt ; else JOBID=$(echo $MUTTJOBS | sed -e "s/\].*$//" | sed -e "s/^\[//" ) ; echo Using mutt job $JOBID ; fg %$JOBID; fi'
|
||||
alias s="sc slrn"
|
||||
alias irc="sc irc"
|
||||
alias ms="mutt -f =search"
|
||||
alias st="screen -dr talker"
|
||||
alias sd="screen -dr download"
|
||||
alias talker="screen -dr talker"
|
||||
alias eximtail="tail -f /var/log/exim4/mainlog"
|
||||
alias db="dropbox.py"
|
||||
|
||||
alias trunc="truncate -s0"
|
||||
|
||||
# Stuff for todo.txt
|
||||
alias waiting="t lf waiting"
|
||||
alias active="t ls active"
|
||||
alias today="t lsp A"
|
||||
alias week="t lsp A-B"
|
||||
|
||||
# git shortcuts
|
||||
alias br="git checkout"
|
||||
alias brl="git branch"
|
||||
alias gg="git grep"
|
||||
alias st="git status"
|
||||
alias gd="git diff"
|
||||
|
||||
if [ "$TERM" == "xterm-256color" ] ; then
|
||||
echo TERM is xterm-256color, assuming MacBook
|
||||
# Safety net for different locations of keys
|
||||
alias rm="rm -i"
|
||||
fi
|
||||
alias log='git log --color --graph --pretty=format:'\''%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit'
|
||||
alias coot="cd ~/src/cooter_umbrella/"
|
||||
17
bashrc.d/fzf.bash
Normal file
17
bashrc.d/fzf.bash
Normal file
@@ -0,0 +1,17 @@
|
||||
# Setup fzf
|
||||
# ---------
|
||||
if [[ ! "$PATH" == */home/paul/.fzf/bin* ]]; then
|
||||
export PATH="${PATH:+${PATH}:}/home/paul/.fzf/bin"
|
||||
fi
|
||||
|
||||
# Auto-completion
|
||||
# ---------------
|
||||
[[ $- == *i* ]] && source "/home/paul/.fzf/shell/completion.bash" 2> /dev/null
|
||||
|
||||
export FZF_DEFAULT_COMMAND='fd --type f --color=never'
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
export FZF_ALT_C_COMMAND='fd --type d . --color=never'
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
source "/home/paul/.fzf/shell/key-bindings.bash"
|
||||
5
bashrc.d/node.bash
Normal file
5
bashrc.d/node.bash
Normal file
@@ -0,0 +1,5 @@
|
||||
# Set up NPM
|
||||
NPM_PACKAGES="$HOME/.npm-packages"
|
||||
NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
|
||||
PATH=$PATH:$NPM_PACKAGES/bin
|
||||
MANPATH="$MANPATH:$NPM_PACKAGES/share/man"
|
||||
13
bashrc.d/prompt.bash
Normal file
13
bashrc.d/prompt.bash
Normal file
@@ -0,0 +1,13 @@
|
||||
prompt() {
|
||||
if [ "$STY" != "" ] ; then
|
||||
SESSION_NAME=$(echo $STY | sed -e 's/^.*\.//')
|
||||
SESSION="[$SESSION_NAME] "
|
||||
. $HOME/data/screen/"$SESSION_NAME".display
|
||||
else
|
||||
SESSION=""
|
||||
fi
|
||||
export PS1="$SESSION\u@\h:\w$ "
|
||||
}
|
||||
|
||||
export PROMPT_DIRTRIM=5
|
||||
export PROMPT_COMMAND=prompt
|
||||
2
bashrc.d/python.bash
Normal file
2
bashrc.d/python.bash
Normal file
@@ -0,0 +1,2 @@
|
||||
export PYTHONPATH=$HOME/lib/python2.7/site-packages/
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
Reference in New Issue
Block a user