title: How to implicitly run a shell script sourced?
body: <p>I have made a shell script to run as terminal command, but the <code>cd</code> commands inside it is not effective and hence I want to run it with <code>source</code> so that the <code>cd</code> commands take effect.</p>
  
  <p>script name : <code>"project.sh"</code></p>
  
  <p>I added this file to <code>/usr/local/bin</code>, made it executable by <code>chmod +x project.sh</code> and it runs fine, but the <code>cd</code> command is not working.</p>
  
  <p>I know it runs in a child process and hence at the end terminal returns back to the starting directory, rendering no effect of <code>cd</code> commands inside <code>project.sh</code>.</p>
  
  <p>The solutions presented at <a href="https://unix.stackexchange.com/questions/50208/how-to-change-the-working-directory-of-invoking-shell-using-a-script">Sol:1</a> do not work for me, because they asks me to run <code>source &lt;file&gt;</code>, which is not possible if I want to use it as Bash command.</p>