diff options
| author | Vineet Kumar <git@vineetk.net> | 2026-05-23 23:19:57 -0400 |
|---|---|---|
| committer | Vineet Kumar <git@vineetk.net> | 2026-05-23 23:19:57 -0400 |
| commit | 45296d1f7688cf00140b488d0825c8c8685034d7 (patch) | |
| tree | 3c4338c8ce3119fc2ef17e66c1292f0a0ba362b3 | |
| parent | 439ca14932d7b3aafe3f3cb07b4551a1f4443bad (diff) | |
found out concat is the analogue to scheme's string-append, not format
| -rw-r--r-- | kasi.el | 11 |
1 files changed, 5 insertions, 6 deletions
| @@ -64,7 +64,7 @@ Two %s are needed for password and username for now." | |||
| 64 | 64 | ||
| 65 | (defun kasi--filename () | 65 | (defun kasi--filename () |
| 66 | "Returns full filename of the secret file." | 66 | "Returns full filename of the secret file." |
| 67 | (let* ((filenames (file-expand-wildcards (format "%s/*/*" kasi-dir))) | 67 | (let* ((filenames (file-expand-wildcards (concat kasi-dir "/*/*"))) |
| 68 | (options (mapcar (lambda (f) | 68 | (options (mapcar (lambda (f) |
| 69 | (kasi--filename-short f)) | 69 | (kasi--filename-short f)) |
| 70 | filenames)) | 70 | filenames)) |
| @@ -81,7 +81,7 @@ Two %s are needed for password and username for now." | |||
| 81 | 81 | ||
| 82 | (defun kasi-get (file elem) | 82 | (defun kasi-get (file elem) |
| 83 | "Prints decrypted element. Wrapper around kasi--get for non-Emacs use." | 83 | "Prints decrypted element. Wrapper around kasi--get for non-Emacs use." |
| 84 | (kasi--get (format "%s/%s%s" kasi-dir file kasi-extension) elem)) | 84 | (kasi--get (concat kasi-dir "/" file kasi-extension) elem)) |
| 85 | 85 | ||
| 86 | (defun kasi--totp (file) | 86 | (defun kasi--totp (file) |
| 87 | "Returns current TOTP code from secret file." | 87 | "Returns current TOTP code from secret file." |
| @@ -118,10 +118,9 @@ Uses /dev/urandom for cryptographic security." | |||
| 118 | 118 | ||
| 119 | (defun kasi--create (file) | 119 | (defun kasi--create (file) |
| 120 | "Creates secret file." | 120 | "Creates secret file." |
| 121 | (let* ((filename (format "%s/%s%s" | 121 | (let* ((filename (concat kasi-dir "/" |
| 122 | kasi-dir file kasi-extension))) | 122 | file kasi-extension))) |
| 123 | (mkdir (format "%s/%s" | 123 | (mkdir (format kasi-dir "/" |
| 124 | kasi-dir | ||
| 125 | (car (split-string file "/"))) | 124 | (car (split-string file "/"))) |
| 126 | t) | 125 | t) |
| 127 | (with-temp-file filename | 126 | (with-temp-file filename |
