1

I have a shell function that lets me quickly cd to a project:

p() {
  cd "$HOME/projects/$1"
}

However, it isn't very useful without autocomplete. I'm using oh-my-zsh, any idea how best to add oh-my-zsh's standard cd autocomplete to my function p?

yashap
  • 45
  • 5
  • This Q is not about programming as defined for StackOverflow. It **may** be more appropriate on http://superuser.com or another StackExchange site. Use the `flag` link at the bottom of your Q and ask the moderator to move it. Please don't post the same Q on 2 different sites. ***Please*** read https://stackoverflow.com/help/on-topic , https://stackoverflow.com/help/how-to-ask , https://stackoverflow.com/help/dont-ask and https://stackoverflow.com/help/mcve before posting more Qs here. GoodLuck – shellter Dec 28 '17 at 04:18
  • Hey @shellter , from the [on topic article](https://stackoverflow.com/help/on-topic), it seems to me that questions about "software tools commonly used by programmers" are appropriate for Stack Overflow. This question is about oh-my-zsh, which is a common software tool for programmers, and there's tonnes of questions about oh-my-zsh on Stack Overflow. To me this seems like the most relevant Stack Exchange site to post this question on? – yashap Dec 28 '17 at 22:17

1 Answers1

-2

I suggest two cool plugins, both add some amazing features that will blow your mind.

  1. https://github.com/clvv/fasd
  2. https://github.com/zsh-users/zsh-autosuggestions
SergioAraujo
  • 11,069
  • 3
  • 50
  • 40
  • Cool, thanks @SergioAraujo . Not the way I was thinking about solving the problem, but I'll give them a shot, both look like promising ways to super-quickly cd to the directories I want. – yashap Dec 29 '17 at 20:20