Recommendation for inclusion in image's .bashrc

It would be awesome if the following could be included in the image /root/.bashrc file.

It will
(1) Set the prompt to root@$THE_HOSTNAME:/path and
(2) Make it so that the default directory for new terminal sessions would be /app/public, which is more useful than starting in /root or /.

site_host () {
grep -i server.*name.dev /etc/apache2/sites-available/000-default.conf /etc/nginx/wordpress/site.conf 2>/dev/null| sed "s/. //" | sed “s/;//” | tail -1
}

PROMPT_COMMAND=‘echo -ne “\033]0;$(site_host)\007”’
export PS1=’${debian_chroot:+($debian_chroot)}\u@$(site_host):\w$ ’

if [ “$STY” == “” ]; then
cd /app/public
fi

I’m going to close this topic since this is no longer necessary in the latest versions of Local (Local Lightning v5.x)

Basically, since Local now is running without a virtual machine, you are free to configure your shell environment in whatever way you like!

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.