title: How to display the current process tree of a bash session?
body: <p>I would like to create a bash alias that gives me the process tree from the current bash session I am using, up to init.</p>
  
  <p>The use case is to know whether I have used <code>bash</code> or <code>vi</code>'s <code>:shell</code> command.</p>
  
  <p>I am using MacOS X. I have heard about <code>pstree</code>, but it seems to only show children, not the relationship between init and the current process.</p>