title: Ascending recursion until file is found
body: <p>First of all I'm very new to shell scripting. But I'm starting to love it more and more.</p>
  
  <p>I really enjoy working on the Terminal, which why I started looking into customizing it for my needs by creating a personal prompt. You know, pro devs - pro prompts :-P</p>
  
  <p>I'm pretty much satisfied with it at the moment. It has all the basic information that you would expect a prompt to have.</p>
  
  <p>But I would love to add a non-standard "feature" to my prompt, but my newbieness is kicking my ass.</p>
  
  <p>What I would love to do, is to create a method which looks for a specific file - in my case <code>composer.json</code> - in the current directory. If it's not found, it should jump up one level and look for it there. If it's not found there, it should jump up another level again and again and again until it finds the file.</p>
  
  <p>At some point you'll probably hit the root <code>/</code> and then it should just abort.</p>
  
  <p>The thing is, I want to be able to extract version numbers from a few specifically installed packages from the <code>composer.lock</code> file and show it in my prompt.</p>
  
  <p>I don't seem to have a problem just looking for a file in the current directory, but it's the recursively ascending part that's problem.</p>
  
  <p>I'm currently using the ZSH shell. Not sure if that provide some other features to achieve this than Bash.</p>
  
  <p>Hope some of you incredible devs can help a shell fanboy out.</p>
  
  <p>If I haven't made myself clear enough or if there is some information that you require that I haven't provided, don't hesitate to mention it and I'll do whatever it takes to give it.</p>