oh-my-fish / plugin-sudope

sudope plugin for Oh-My-Fish. Quickly put 'sudo' in your command
ISC License
32 stars 10 forks source link

Custom Super User Command #15

Open savaroskij opened 4 years ago

savaroskij commented 4 years ago

This PR adds and documents the possibility to set a custom super user command to prepend to the command line, such as doas instead of sudo for *BSD users.

You can set the custom su command in the variable su_command.

bobthecow commented 4 years ago

This seems entirely reasonable. I would probably use sudope_command as the variable name, to keep it namespaced by the plugin that consumes it.

savaroskij commented 4 years ago

Thanks @bobthecow, that's a good idea. Done this in 47e694636e7e4cb2d3a6ac0f927ba3593ebc058c.

savaroskij commented 4 years ago

e1492c6c15412f3c95b8b0f1954eebb7cc1d7b46 fixes a bug introduced by previous changes in my branch: when the super user command was added to the command line, the following white space was not considered in pushing the cursor ahead.