Merge branch 'master' of https://github.com/desandro/bash-it
commit
65ce6fdb6f
|
|
@ -46,6 +46,15 @@ alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
|
|||
alias md='mkdir -p'
|
||||
alias rd=rmdir
|
||||
|
||||
# show / hide hidden files
|
||||
alias showhidden="defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder"
|
||||
alias hidehidden="defaults write com.apple.finder AppleShowAllFiles FALSE; killall Finder"
|
||||
# display IP address
|
||||
alias myip="echo ethernet:; ipconfig getifaddr en0; echo wireless:; ipconfig getifaddr en1"
|
||||
|
||||
# http://snippets.dzone.com/posts/show/2486
|
||||
alias killsvn="find . -name ".svn" -type d -exec rm -rf {} \;"
|
||||
|
||||
function aliases-help() {
|
||||
echo "Generic Alias Usage"
|
||||
echo
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ case $OSTYPE in
|
|||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
function git-help() {
|
||||
echo "Git Custom Aliases Usage"
|
||||
echo
|
||||
|
|
|
|||
|
|
@ -18,3 +18,6 @@ alias buildsite="builtin cd $JEKYLL_LOCAL_ROOT && rm -rf _site/ && jekyll"
|
|||
# Rsync the site to the remote server
|
||||
|
||||
alias deploysite="builtin cd $JEKYLL_LOCAL_ROOT && rsync -rz _site/ $JEKYLL_REMOTE_ROOT"
|
||||
|
||||
alias jkas="jekyll --auto --server"
|
||||
alias rmjkas="rm -rf _site/* && jkas"
|
||||
|
|
@ -14,6 +14,7 @@ alias dashcode="open -a dashcode"
|
|||
alias f='open -a Finder '
|
||||
alias textedit='open -a TextEdit'
|
||||
alias hex='open -a "Hex Fiend"'
|
||||
alias gitx="open -a GitX"
|
||||
|
||||
if [ -s /usr/bin/firefox ] ; then
|
||||
unalias firefox
|
||||
|
|
|
|||
|
|
@ -5,6 +5,13 @@ function git_remote {
|
|||
git remote add origin $GIT_HOSTING:$1.git
|
||||
}
|
||||
|
||||
# git add remote branch
|
||||
function garb() {
|
||||
echo "Adding remote branch '$1'";
|
||||
git config branch.$1.remote origin;
|
||||
git config branch.$1.merge refs/heads/$1;
|
||||
}
|
||||
|
||||
function git_first_push {
|
||||
echo "Running: git push origin master:refs/heads/master"
|
||||
git push origin master:refs/heads/master
|
||||
|
|
@ -92,4 +99,3 @@ else
|
|||
echo "you're currently not in a git repository"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ editpost() {
|
|||
fi
|
||||
}
|
||||
|
||||
newpost() {
|
||||
jknewpost() {
|
||||
|
||||
# 'builtin cd' into the local jekyll root
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ SCM_HG_CHAR='☿'
|
|||
SVN='svn'
|
||||
SCM_SVN_CHAR='⑆'
|
||||
|
||||
SCM_NONE_CHAR='○'
|
||||
SCM_NONE_CHAR='·'
|
||||
|
||||
RVM_THEME_PROMPT_PREFIX=' |'
|
||||
RVM_THEME_PROMPT_SUFFIX='|'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
# based off of n0qorg
|
||||
# looks like, if you're in a git repo:
|
||||
# ± ~/path/to (branch ✓) $
|
||||
# in glorious red / blue / yellow color scheme
|
||||
|
||||
prompt_setter() {
|
||||
# Save history
|
||||
history -a
|
||||
history -c
|
||||
history -r
|
||||
# displays user@server in purple
|
||||
# PS1="\[$red\]$(scm_char) \[$purple\]\u@\h\[$reset_color\]:\[$blue\]\w\[$yellow\]$(scm_prompt_info)$(rvm_version_prompt) \[$black\]$\[$reset_color\] "
|
||||
# no user@server
|
||||
PS1="\[$red\]$(scm_char) \[$blue\]\w\[$yellow\]$(scm_prompt_info)$(rvm_version_prompt) \[$black\]$\[$reset_color\] "
|
||||
PS2='> '
|
||||
PS4='+ '
|
||||
}
|
||||
|
||||
PROMPT_COMMAND=prompt_setter
|
||||
|
||||
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
|
||||
SCM_THEME_PROMPT_CLEAN=" ${green}✓"
|
||||
SCM_THEME_PROMPT_PREFIX=" ("
|
||||
SCM_THEME_PROMPT_SUFFIX="${yellow})"
|
||||
RVM_THEME_PROMPT_PREFIX=" ("
|
||||
RVM_THEME_PROMPT_SUFFIX=")"
|
||||
Loading…
Reference in New Issue