TErminal prompt never references my repo
My repo was setup using cPanel Git" Version Control. Problem (though minor) - the cPanel Terminal prompt always starts one level higher than the actual repo.
When i was setting up the repo it asked me where i should set the repo and i specified 'public_html' where it can correctly be seen with the path:
However whenever i start terminal it always opens in:
so I'm constantly 'cd'-ing (changing directory) into 'public_html' - its probably simple but i dont know how to permanently change terminal to start in 'public_html' the repo index repo.
/home/myusername/public_html/However whenever i start terminal it always opens in:
/home/myusername/so I'm constantly 'cd'-ing (changing directory) into 'public_html' - its probably simple but i dont know how to permanently change terminal to start in 'public_html' the repo index repo.
-
Hey there! While there isn't a setting in cPanel to control this, you could add the following line to the end of the /home/username/.bashrc file, as this gets run each time the user logs in: cd /home/username/public_html
That will tell Bash to cd you into the public_html directory each time the user is logged in. Let me know if that works for you!0 -
Hi cPRex, That did the trick!, i thank you - still learning bash commands so this one is right at the top of my list; its the obvious ones that fool you sometimes. thank you 0 -
You're welcome - glad that's all it took! 0
Please sign in to leave a comment.
Comments
3 comments