Article 56GPS bash command with arguments in variable

bash command with arguments in variable

by
blueray
from LinuxQuestions.org on (#56GPS)
If I use export EDITOR="code" then run $EDITOR, It opens vscode.

However, If I use export EDITOR="code -n -w" then use $EDITOR, it says

Code:% $EDITOR
code -n -w: command not foundHow can I use code -n -w in $EDITOR so that it identifies it as a command.latest?d=yIl2AUoC8zA latest?i=n3cXMjrD95w:DEBWV9swJz4:F7zBnMy latest?i=n3cXMjrD95w:DEBWV9swJz4:V_sGLiP latest?d=qj6IDK7rITs latest?i=n3cXMjrD95w:DEBWV9swJz4:gIN9vFwn3cXMjrD95w
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments