mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 08:39:42 -04:00
Adding cd git root command
This commit is contained in:
parent
2dd137dbf5
commit
5c8b6706a1
1 changed files with 11 additions and 0 deletions
|
|
@ -87,6 +87,17 @@ fi
|
|||
# Custom Functions
|
||||
##
|
||||
|
||||
# CD to Git root
|
||||
function cdg() {
|
||||
local root
|
||||
root=$(git rev-parse --show-toplevel 2> /dev/null)
|
||||
if [[ -n $root ]]; then
|
||||
cd $root
|
||||
else
|
||||
echo "Not a git repo"
|
||||
fi
|
||||
}
|
||||
|
||||
# penpot {run|stop|update|help} alias function
|
||||
function penpot() {
|
||||
case "$1" in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue