Skip to content

Instantly share code, notes, and snippets.

@karuppiah7890
Created July 28, 2018 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karuppiah7890/8b2a77ee0e6c6231364d84091624e17b to your computer and use it in GitHub Desktop.
Save karuppiah7890/8b2a77ee0e6c6231364d84091624e17b to your computer and use it in GitHub Desktop.
Go to any directory containing project source code. Projects are in Gitlab. There are many groups and many repos under each group, tought to navigate, so a small script to navigate
alias godir='cd ~/projects/gitlab/$(fd --max-depth 2 -t d . ~/projects/gitlab/ | xargs -I {} sh -c "echo {} | cut -d / -f 6,7" | fzf --height 15)'

Use the whole command based on the directory structure, especially the cut command. You need fd and fzf installed for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment