Просмотр исходного кода

fixes to bw data file custom setting

* Define default bw data file location based on OS
* Fix help message.
Gaelan D'costa 6 лет назад
Родитель
Сommit
c5229e4707
1 измененных файлов с 8 добавлено и 2 удалено
  1. 8 2
      bitwarden.el

+ 8 - 2
bitwarden.el

@@ -50,8 +50,14 @@
   :type 'string)
 
 (defcustom bitwarden-data-file
-  (expand-file-name "~/Library/Application Support/Bitwarden CLI/data.json")
-  "The bw cli executable used by Bitwarden."
+  (expand-file-name (cond
+		     ((eq system-type 'darwin)
+		      "~/Library/Application Support/Bitwarden CLI/data.json")
+		     ((eq system-type 'windows-nt)
+		      "~/AppData/Bitwarden CLI/data.json")
+		     (t
+		      "~/.config/Bitwarden CLI/data.json")))
+  "The bw data file used by Bitwarden."
   :group 'bitwarden
   :type 'string)