This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## throw this at the top of your .bash_profile | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/* \1/' | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias tab=new_terminal_working_directory | |
function new_terminal_working_directory() { | |
osascript <<END | |
tell application "Terminal" | |
tell application "System Events" to tell process "Terminal" to keystroke "t" using command down | |
do script "cd $(pwd)" in first window | |
end tell | |
END | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Dusdanig transpose lines | |
;; | |
;; The transpose lines (C-x C-t) really anoyed me. I kept squinting my | |
;; eyes to see what lines would be transposed. Also the point was | |
;; never near the line which should have been transposed. It made no | |
;; sense to me. | |
;; | |
;; The solution this listing implements will swap the previous and | |
;; current line when the point is aproximatly at the start of the line | |
;; and will swap the current and next line if the point is aproximatly |