Skip to main content
deleted 31 characters in body; edited tags; edited title
Source Link
Jeff Schaller
  • 67.7k
  • 35
  • 118
  • 255

How do iI make an alias for a command with sudo

I want to add two aliases, so one executes a command when non sudo, and the other executes a command when sudo, like this:

alias v = 'nvim'
alias 'sudo v' = 'sudo -E nvim '

iI also have statedset alias sudo='sudo ', i clarify this just in case.

How do i make an alias for a command with sudo

I want to add two aliases, so one executes a command when non sudo, and the other executes a command when sudo, like this:

alias v = 'nvim'
alias 'sudo v' = 'sudo -E nvim '

i also have stated alias sudo='sudo ', i clarify this just in case

How do I make an alias for a command with sudo

I want to add two aliases, so one executes a command when non sudo, and the other executes a command when sudo, like this:

alias v = 'nvim'
alias 'sudo v' = 'sudo -E nvim '

I also have set alias sudo='sudo '.

added 10 characters in body; edited tags
Source Link
ilkkachu
  • 141.4k
  • 16
  • 249
  • 418

I want to add two aliases, so one executes a command when non sudo, and the other executes a command when sudo, like this:

alias v = 'nvim' alias 'sudo v' = 'sudo -E nvim '

alias v = 'nvim'
alias 'sudo v' = 'sudo -E nvim '

i also have stated alias sudo='sudo 'alias sudo='sudo ', i clarify this just in case

I want to add two aliases, so one executes a command when non sudo, and the other executes a command when sudo, like this:

alias v = 'nvim' alias 'sudo v' = 'sudo -E nvim '

i also have stated alias sudo='sudo ', i clarify this just in case

I want to add two aliases, so one executes a command when non sudo, and the other executes a command when sudo, like this:

alias v = 'nvim'
alias 'sudo v' = 'sudo -E nvim '

i also have stated alias sudo='sudo ', i clarify this just in case

Source Link
Ramita
  • 11
  • 1
  • 2

How do i make an alias for a command with sudo

I want to add two aliases, so one executes a command when non sudo, and the other executes a command when sudo, like this:

alias v = 'nvim' alias 'sudo v' = 'sudo -E nvim '

i also have stated alias sudo='sudo ', i clarify this just in case