Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: print the directory path to stdout on ghq get #352

Open
pomdtr opened this issue Nov 17, 2022 · 2 comments
Open

Feature request: print the directory path to stdout on ghq get #352

pomdtr opened this issue Nov 17, 2022 · 2 comments

Comments

@pomdtr
Copy link

pomdtr commented Nov 17, 2022

Usecase: cd "$(ghq get x-motemen/ghq)" to clone the repo and cd to the corresponding dir.

@Songmu
Copy link
Member

Songmu commented Nov 17, 2022

Thanks for the request. It is a reasonable idea from a UNIX philosophy perspective.

@folliehiyuki
Copy link
Contributor

Here is my simple fzf script (written in fish) that does the job:

function ghq_cd
  set -l proj (ghq list -p | fzf \
      --no-multi \
      --prompt "Project: " \
      --preview "lsd -1FAL --group-dirs first --icon always --color always {}" \
      )
  if test -n "$proj"
    cd -- "$proj"
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants