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)]
|
(bitwarden--set-config-server)]
|
||||||
["Actions"
|
["Actions"
|
||||||
("g" "Get current server" bitwarden--action-get-server)
|
("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 ()
|
(transient-define-prefix bitwarden-login ()
|
||||||
["Options"
|
["Options"
|
||||||
@ -331,30 +333,41 @@ This function is meant to be called by a transient.")
|
|||||||
(bitwarden--set-login-code)]
|
(bitwarden--set-login-code)]
|
||||||
["Actions"
|
["Actions"
|
||||||
("l" "Login" bitwarden--action-login)
|
("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 ()
|
(transient-define-prefix bitwarden-transient ()
|
||||||
["Actions"
|
["Actions"
|
||||||
("c" "Config" bitwarden--config)
|
("c" "Config" bitwarden-config)
|
||||||
("l" "Login" bitwarden--login)
|
("l" "Login" bitwarden-login)
|
||||||
("L" "Lock" bitwarden-lock)
|
("L" "Lock" bitwarden-lock)
|
||||||
("s" "sync" bitwarden-dummy)])
|
("s" "sync" bitwarden-dummy)]
|
||||||
|
(interactive)
|
||||||
|
(transient-setup 'bitwarden-transient))
|
||||||
|
|
||||||
;;; Public functions
|
;;; Public functions
|
||||||
|
;;;###autoload
|
||||||
(defun bitwarden-lock ()
|
(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
|
(progn
|
||||||
(setq bitwarden--session nil
|
(setq bitwarden--session nil
|
||||||
bitwarden--login-password nil
|
bitwarden--login-password nil
|
||||||
bitwarden--login-passwordenv nil
|
bitwarden--login-passwordenv nil
|
||||||
bitwarden--login-passwordfile nil
|
bitwarden--login-passwordfile nil
|
||||||
bitwarden--login-code 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"))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
;; (defun bitwarden ()
|
(defun bitwarden ()
|
||||||
;; (interactive)
|
"Call the main transient for Bitwarden."
|
||||||
;; (call-interactively #'bitwarden-transient))
|
(interactive)
|
||||||
|
(call-interactively #'bitwarden-transient))
|
||||||
|
|
||||||
(provide 'bitwarden)
|
(provide 'bitwarden)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user