mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Misc updates
This commit is contained in:
8
dotfiles/config/fish/functions/cdgr.fish
Normal file
8
dotfiles/config/fish/functions/cdgr.fish
Normal file
@@ -0,0 +1,8 @@
|
||||
# Change to the root of the git repository.
|
||||
# If not in a git repo, do nothing.
|
||||
function cdgr
|
||||
set git_root (git rev-parse --show-toplevel 2>/dev/null)
|
||||
if test -n "$git_root"
|
||||
cd "$git_root"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user