On Sun, Jun 9, 2013 at 4:02 PM, Platonides <[email protected]> wrote: > On 09/06/13 00:01, Tim Landscheidt wrote: >>>> >>>> Can't you make your .vimrc world-readable (does it contain >>>> sensitive information?) and then "vim -u ~user/.vimrc"? Ah, >>>> sudo even sets SUDO_USER to the calling user, so you could >>>> somewhat automate that even for multiple maintainers. >> >> >>> SUDO_USER is very useful indeed. Do you also know which initialization >>> files are called when becoming a service account? It would be nice to >>> add `alias >>> vim="vim -u ~$SUDO_USER/.vimrc"` somewhere, but .bashrc (for the service >>> account) does not seem to be read. >> >> >> ~/.bashrc is usually called by ~/.profile which is missing >> for service accounts as well. So I copy these (slightly >> adapted) to new tools I create, not least to alias "rm" to >> "rm -i" :-). > > > I would add those alias to /etc/bash.bashrc, so that you don't need to copy > dot files to service accounts.
Should probably make the alias conditional on [ -r ~$SUDO_USER/.vimrc ], otherwise if someone manages to not have a .vimrc (or it's not readable) they'll get errors about the missing file. _______________________________________________ Labs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/labs-l
