BASH version: 5.2.26(1)-release. OS: Fedora; Desktop edition. Hello.
Current state: Vim set as default text editor. $ cat .bashrc | grep '^export EDITOR' export EDITOR='/usr/bin/vim' $ typeset -p EDITOR declare -x EDITOR="/usr/bin/vim" $ which nano /usr/bin/nano Failure: attempt to set a text editor as the default one of the current session. To reproduce in terminal $ export EDITOR='/usr/bin/nano' && source $HOME/.bashrc $ echo $EDITOR /usr/bin/vim Expected: Latest command's output to be "/usr/bin/nano" instaed of "/usr/bin/vim". I unexpectedly get the desired behaviour without invoking 'source'. $ export EDITOR='/usr/bin/nano' $ echo $EDITOR /usr/bin/nano Hopefully, my interpretation of the 'source' command is correct.