Skip to content

Instantly share code, notes, and snippets.

@MartinWallgren
Created July 5, 2019 07:26
Show Gist options
  • Save MartinWallgren/80791d7abd7b9da02e4801f6da64fdfa to your computer and use it in GitHub Desktop.
Save MartinWallgren/80791d7abd7b9da02e4801f6da64fdfa to your computer and use it in GitHub Desktop.
Bash function to navigate to a git project directory with fzf
function cdgit() {
local dir
dir=$(find $HOME -type d -name .git -exec dirname {} \; | fzf-tmux) && cd "$dir"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment