[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Path of exported variable not set as source
From: |
Ricky Tigg |
Subject: |
Path of exported variable not set as source |
Date: |
Fri, 26 Jan 2024 15:28:11 +0200 |
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.
- Path of exported variable not set as source,
Ricky Tigg <=