This should fix the autoload issues with transient
This commit is contained in:
parent
4b8fcc95c0
commit
c33f99c2ef
35
bitwarden.el
35
bitwarden.el
@ -319,7 +319,9 @@ This function is meant to be called by a transient.")
|
||||
(bitwarden--set-config-server)]
|
||||
["Actions"
|
||||
("g" "Get current server" bitwarden--action-get-server)
|
||||
("s" "Set current server" bitwarden--action-set-server)])
|
||||
("s" "Set current server" bitwarden--action-set-server)]
|
||||
(interactive)
|
||||
(transient-setup 'bitwarden-config))
|
||||
|
||||
(transient-define-prefix bitwarden-login ()
|
||||
["Options"
|
||||
@ -331,30 +333,41 @@ This function is meant to be called by a transient.")
|
||||
(bitwarden--set-login-code)]
|
||||
["Actions"
|
||||
("l" "Login" bitwarden--action-login)
|
||||
("L" "Logout" bitwarden--action-logout)])
|
||||
("L" "Logout" bitwarden--action-logout)]
|
||||
(interactive)
|
||||
(transient-setup 'bitwarden-login))
|
||||
|
||||
(transient-define-prefix bitwarden-transient ()
|
||||
["Actions"
|
||||
("c" "Config" bitwarden--config)
|
||||
("l" "Login" bitwarden--login)
|
||||
("c" "Config" bitwarden-config)
|
||||
("l" "Login" bitwarden-login)
|
||||
("L" "Lock" bitwarden-lock)
|
||||
("s" "sync" bitwarden-dummy)])
|
||||
("s" "sync" bitwarden-dummy)]
|
||||
(interactive)
|
||||
(transient-setup 'bitwarden-transient))
|
||||
|
||||
;;; Public functions
|
||||
;;;###autoload
|
||||
(defun bitwarden-lock ()
|
||||
"Lock the vault and destroy active session keys."
|
||||
"Lock the vault and destroy active session keys.
|
||||
The command may fail in the user is not logged in."
|
||||
(interactive)
|
||||
(progn
|
||||
(setq bitwarden--session nil
|
||||
bitwarden--login-password nil
|
||||
bitwarden--login-passwordenv nil
|
||||
bitwarden--login-passwordfile nil
|
||||
bitwarden--login-code nil)
|
||||
(bitwarden--run-cli "lock")))
|
||||
(bitwarden--run-cli "lock")
|
||||
(if (= 0 bitwarden--shell-status)
|
||||
(message "Bitwarden: successfuly locked")
|
||||
(message "Bitwarden: something went wrong"))))
|
||||
|
||||
|
||||
;; (defun bitwarden ()
|
||||
;; (interactive)
|
||||
;; (call-interactively #'bitwarden-transient))
|
||||
;;;###autoload
|
||||
(defun bitwarden ()
|
||||
"Call the main transient for Bitwarden."
|
||||
(interactive)
|
||||
(call-interactively #'bitwarden-transient))
|
||||
|
||||
(provide 'bitwarden)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user