Re: Path of exported variable not set as source

2024-01-26 Thread Greg Wooledge
On Fri, Jan 26, 2024 at 03:28:11PM +0200, Ricky Tigg wrote: > $ 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". It's really unclear to me why you expected this. You're

Re: Path of exported variable not set as source

2024-01-26 Thread Chet Ramey
On 1/26/24 8:28 AM, Ricky Tigg wrote: Hopefully, my interpretation of the 'source' command is correct. It's not: the `source' command reads and executes commands from the filename argument. What do you think it does, and why do you think the results you expected are correct? -- ``The lyf so

Re: Path of exported variable not set as source

2024-01-26 Thread alex xmb sw ratchev
On Fri, Jan 26, 2024, 14:29 Ricky Tigg wrote: > 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

Path of exported variable not set as source

2024-01-26 Thread Ricky Tigg
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