I work in an LDAP-based user and host network. My user exists on all hosts since it an LDAP user, and my user's home directory exists on all hosts as a mountpoint.
I have ~/.bash_profile set up to source ~/.bashrc if it exists.
Inside ~/.bashrc my final line is set -o emacs.
On local shells this correctly sets the emacs option to enable emacs-style line editing after login.
But when I ssh to another host, despite my ~/.bashrc loading everything else, the set -o emacs is either not applied or applied then overridden.
Therefore at the moment I have to manually set -o emacs each time I ssh to another host.
Is there a fix for this such that I can ssh to another host and have set -o emacs run automatically so immediately upon entering the interactive shell, emacs line-editing is enabled?
sshstarts an interactive login shell. bash does not read.bashrcwhen started as an interactive login shell.~/.bash_profiletesting whether.bashrcexists? What does that code look like?~/.bash_profilebecause my prompt is set correctly in the SSH session and if I e.g. add an 'echo Hi There' line after theset -o emacsin my.bashrcthe echo appears after SSH login.