diff --git a/README.md b/README.md index ce19236..2cd26a2 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ require('cmp').setup({ | Command | Description | |-------------------|--------------------------------------------------------------------| | `Fitten register` | If you haven't registered yet, please run the command to register. | -| `Fitten login` | Try the command `Fitten login ` to login. | +| `Fitten login` | Try the command `Fitten login` to login. | | `Fitten logout` | Logout account | ### Action Commands diff --git a/lua/fittencode/api.lua b/lua/fittencode/api.lua index d84ebba..68753dc 100644 --- a/lua/fittencode/api.lua +++ b/lua/fittencode/api.lua @@ -10,6 +10,8 @@ M.api = { ---@param username string ---@param password string login = function(username, password) + username = vim.fn.input('username ') + password = vim.fn.inputsecret('password ') Sessions.login(username, password) end, logout = function()