Add root() function
This commit is contained in:
parent
325c1e102a
commit
b21b00a885
1 changed files with 8 additions and 0 deletions
|
@ -142,6 +142,14 @@ function edit() {
|
||||||
eval "${editor}"
|
eval "${editor}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function root() {
|
||||||
|
if [[ -n $(git rev-parse --show-toplevel) ]]
|
||||||
|
then
|
||||||
|
cd "$(git rev-parse --show-toplevel)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if [[ -d $HOME/.anyenv ]]; then
|
if [[ -d $HOME/.anyenv ]]; then
|
||||||
path+=($HOME/.anyenv/bin)
|
path+=($HOME/.anyenv/bin)
|
||||||
if [[ ( $ZNAP_USED = 1 ) ]]; then
|
if [[ ( $ZNAP_USED = 1 ) ]]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue