GNU nano opens when I set up the crontab, but I want to change it to VS Code.

Asked 2 years ago, Updated 2 years ago, 462 views

I want to change the text editor that opens when setting crontab to VS Code Insider version, so I added the ShellScript below to ./profile, but GNU nano will open.

Please tell me how to change the text editor that opens when setting the crontab.

 echo export EDITOR=code-insiders>>/home/pi/.profile
source to /.profile

shellscript cron

2022-09-30 21:54

1 Answers

I don't know what shell you're using, but if it's common, neither /profile nor ~/profile will run automatically.If the code presented is written in ~/.profile, source~/.profile will result in infinite recursion.

In ~/.profile,

export EDITOR=code-insiders

Reboot the shell by writing


2022-09-30 21:54

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.