New answers tagged

1 vote

How do I make an alias for a command with sudo

If you want to use that particular syntax, where v is an alias for nvim but sudo v executes sudo -E nvim (but you don't want -E for all uses of sudo), you most likely to need to redefine sudo with a ...
user avatar
  • 7,422
1 vote

How do I make an alias for a command with sudo

If you have alias sudo='sudo ' alias v='nvim' then running sudo v whatever would run sudo nvim whatever, as the trailing space in the alias makes the shells look at the next word for alias expansion ...
user avatar
  • 119k
1 vote

How do I make an alias for a command with sudo

I'm describing what to do in bash. I don't know zsh well enough to describe what to do there. I think your problem is on the left side of the equal sign. Use a unique, short and easy to remember name ...
user avatar
  • 5,260

Top 50 recent answers are included