Browse Source

shrc: Add new function root

pull/1/head
10sr 10 years ago
parent
commit
7bfe3af653
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      shrc

+ 9
- 0
shrc View File

@@ -433,6 +433,15 @@ cd(){
builtin cd "$@" && pwd builtin cd "$@" && pwd
} }


root(){
if test "`git rev-parse --is-inside-work-tree 2>/dev/null`" = true
then
cd "`git rev-parse --show-toplevel`"
else
cd /
fi
}

# pad # pad
alias pad=notepad alias pad=notepad
__safe_alias pad=gedit __safe_alias pad=gedit


Loading…
Cancel
Save