freebsd-update editor choice

Anton Sayetsky vsasjason at gmail.com
Tue Dec 15 12:59:09 UTC 2015


15 дек. 2015 г. 14:46 пользователь "Bertram Scharpf" <
lists at bertram-scharpf.de> написал:
>
> Hi,
>
> On Sunday, 13. Dec 2015, 12:31:22 -0600, Gene wrote:
> > I'm using freebsd-update to update my 10.1 system to 10.2. When merging
files,
> > it insists on using the 'vi' editor. I really, really, REALLY, despise
vi. Is
> > there a way to get it to use another editor?
>
> The problem I fussed about many times and long times without
> any understanding up to this day is not how but _where_ to
> set the EDITOR environment variable. There is
>
>   - /etc/login.conf
This applies to all logins.

>   - /etc/rc
You should never touch this file.

>   - /etc/profile (and /etc/zprofile)
For bash-like and zsh shells, system wide.

>   - /etc/csh.cshrc (or /etc/zshrc)
For [t]csh and zsh, system wide.

>   - ~/.profile (and ~/.zprofile)
Bash-like and zsh, user-specific.

>   - ~/.shrc, ~/.cshrc, (or ~/.zshrc)
For sh, [t]csh and zsh, user specific.

*rc usually read when shell starts, *profile only when entering interactive
session, AFAIK.
Advanced shells will read all supported files, for example zsh can read
shrc, bashrc and respective *profile.
Also, can you show me the shell where this isn't documented in manpage? ;-)

>   - probably some more I forgot here
>
> Some programs change their behaviour in dependence of the
> EDITOR variable. For example if you log into a host with the
> command
>
>   $ ssh otherhost -t tmux
>
> most of the above files are left unregarded and the TMux
> option 'status-keys' may be set to an undesired value.
>
> Is there any documentation in which order and under which
> circumstances the above files are executed or come into
> respect?
>
> By the way: there was a time when I considered Vi/Vim a
> really, really, REALLY weird approach to editing. Then I
> managed to change my opinion and gave it a try. It was one
> of the best decisions in my life. Of course, this mail is
> written in Vim.
>
> Bertram
>
>
> --
> Bertram Scharpf
> Stuttgart, Deutschland/Germany
> http://www.bertram-scharpf.de
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list