Comments (11)
@lambdalisue this seems to be a documentation issue.
according to the docs, if you set suda#nopass
, then suda won't ask for a password, but really, suda attempts to run without a password, then asks for a password. this should be properly reflected in the docs.
alternatively, if this is a bug, then when suda#nopass
is set and the first attempt fails, we should stop trying.
I'm happy to submit a PR fixing this issue once I know what the intended behavior is 😃
from suda.vim.
@lambdalisue you know how the joke goes: There are only two hard things in Computer Science: cache invalidation and naming things.
That being said, perhaps suda#trynopass
or suda#nopassfirst
would be acceptable names?
I would love to join as a collaborator! This plugin is one of the core plugins that I use almost daily (I hate opening neovim as root and losing my config), so I'd love to help make it better 😃
from suda.vim.
you know how the joke goes: There are only two hard things in Computer Science: cache invalidation and naming things.
That is a universal truth of this world 📚
That being said, perhaps suda#trynopass or suda#nopassfirst would be acceptable names?
Well, I'm sorry but it's a bit... I feel there is a better name so I made a new issue (#73).
I would love to join as a collaborator! This plugin is one of the core plugins that I use almost daily (I hate opening neovim as root and losing my config), so I'd love to help make it better 😃
👍
from suda.vim.
@rew1nter if you set suda#nopass
, then suda will attempt to save without the root password. If you don't have sudo
set up to allow no password, then it will fail, then suda will ask for a password and try to save using it.
so if you want to save without a password, set suda#nopass
and setup sudo with NOPASSWD
How to set NOPASSWD: https://askubuntu.com/a/147265
from suda.vim.
Setting this in the init.lua file doens't work. I'm using nvchad and this is how I'm installing this plugin:
{
"lambdalisue/suda.vim",
lazy = false,
},
do you know how I can load this variable before the plugin is loaded?
from suda.vim.
do you know how I can load this variable before the plugin is loaded?
I think you don't need to load the variable. Just set the variable.
from suda.vim.
I think you don't need to load the variable. Just set the variable.
I tried what was told. And it was not set
from suda.vim.
How did you set and check?
from suda.vim.
Currently I have this in my init.lua file of nvchad:
vim.g["suda#prompt"] = "Mot de passe: "
vim.g["suda#nopass"] = 1
Here the prompt changes but still asks for the password :/
from suda.vim.
You're right, the behavior is different from what one might expect from the variable name suda#nopass
. If there is a word that can better explain the current behavior, we could mark suda#nopass
as deprecated and change it to a new variable name. Do you have any good suggestions for a new variable name?
However, the intention of the issue creator is unclear (it's not clear whether the behavior of suda#nopass
is truly not intended, or if the timing of the configuration is off so it's not being configured properly). So if discussion is needed, please create a new issue. If you have a good name suggestion, feel free to submit a pull request directly.
Come to think of it, I really appreciate all the contributions you've been making recently. A bit off-topic, but would you be interested in joining as a collaborator?
from suda.vim.
okay guys so just to be clear, There is currently no way of saving without root password?
from suda.vim.
Related Issues (20)
- Problem with -p flag HOT 2
- How do I install this? HOT 1
- Duplicate buffers with smart edit HOT 4
- neovim lsp jump to definition throws error on readonly files when using suda_smart_edit HOT 3
- When sudo is configured to ask for a fingerprint, suda halts for a long time HOT 1
- suda does not work when `sudo` command is aliased to something else HOT 3
- Cannot activate suda_smart_edit HOT 4
- suda:///the/path/of/file will disable language server's jumpDefinition HOT 2
- Empty "suda:" directory created in $HOME on write HOT 2
- Prompt on new buffer with g:suda_smart_edit and g:suda#nopass HOT 5
- suda cannot handle files that include '#' in the name HOT 1
- bug suda.vim seems to not be working with lazy.nvim
- Problems with suda_smart_edit if it's set after the plugin loaded. [[SOLVED]]
- Duplicate tag "suda" in doc
- Rename undescriptive name `suda#nopass` to more descriptive name like `suda#...something...` HOT 4
- [suda] Vim(let):E730: Using a List as a String HOT 6
- Error executing system command when using nushell HOT 2
- SudoWrite errors with "a password is required" HOT 2
- "suda:" directories get added in current dir when saving HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from suda.vim.