stardreamer,
@stardreamer@lemmy.blahaj.zone avatar

Iirc the specific reason behind this is

  • sudo by default requires a tty to run
  • vim’s bang spawns a tty to execute commands
  • nvim’s bang executes the command directly, then pipes the output to nvim

As a result, sudo (without args) can’t work in nvim as it doesn’t have a tty to prompt the user for passwords. Nvim also used to do what vim did, but they found out spawning the tty was causing other issues (still present in vim) so they changed it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linuxmemes@lemmy.world
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • InstantRegret
  • Durango
  • provamag3
  • everett
  • cisconetworking
  • Leos
  • normalnudes
  • cubers
  • modclub
  • ngwrru68w68
  • tacticalgear
  • megavids
  • anitta
  • tester
  • JUstTest
  • lostlight
  • All magazines