[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 7346057087 471/500: nix-flake: Show aliases in th
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 7346057087 471/500: nix-flake: Show aliases in the registry as well |
Date: |
Sat, 29 Jan 2022 08:27:57 -0500 (EST) |
branch: elpa/nix-mode
commit 7346057087f52e03eaff6f7f9232dbfd5375e53c
Author: Akira Komamura <akira.komamura@gmail.com>
Commit: Akira Komamura <akira.komamura@gmail.com>
nix-flake: Show aliases in the registry as well
Show flake:* names as well for convenience in completing registry
entries.
---
nix-flake.el | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/nix-flake.el b/nix-flake.el
index bdf432f957..775eb3d846 100644
--- a/nix-flake.el
+++ b/nix-flake.el
@@ -83,23 +83,23 @@ already registered in either the user or the global
registry."
;; just in case, but it may not be necessary.
(defun nix-flake--select-flake (&optional prompt initial-input history)
"Select a flake from the registry."
- (let* ((registry-entries (thread-last (nix-flake--registry-list)
- (cl-remove-if-not (pcase-lambda (`(,type . ,_))
- (member type '("user"
"global"))))))
+ (let* ((registered-flakes (thread-last (nix-flake--registry-list)
+ ;; I don't know if I should include flakes in the
+ ;; system registry. It's ugly to display full
+ ;; checksums, so I won't include them for now.
+ (cl-remove-if-not (pcase-lambda (`(,type . ,_))
+ (member type '("user"
"global"))))
+ (mapcar (lambda (cells)
+ (list (nth 1 cells)
+ (nth 2 cells))))
+ (flatten-list)))
(input (string-trim
(completing-read (or prompt "Flake URL: ")
- (thread-last registry-entries
- (mapcar (pcase-lambda (`(,_ ,_ ,ref))
- ref)))
+ registered-flakes
nil nil nil history initial-input))))
(prog1 input
(when (and nix-flake-add-to-registry
- (not (member input
- (thread-last registry-entries
- (mapcar (lambda (cells)
- (list (nth 1 cells)
- (nth 2 cells))))
- (flatten-list)))))
+ (not (member input registered-flakes)))
(let ((name (read-string (format-message "Enter the registry name for
%s: "
input))))
(unless (or (not name)
- [nongnu] elpa/nix-mode 12d1e29ff1 397/500: Merge pull request #106 from jcs-PR/minor, (continued)
- [nongnu] elpa/nix-mode 12d1e29ff1 397/500: Merge pull request #106 from jcs-PR/minor, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 8bc6750c4c 420/500: Update flake.lock., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1b1b9fb61d 440/500: Update nixos, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode f2acc55830 431/500: Add .dir-locals.el file, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1697f18066 439/500: Fix #128, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 04d9a86eae 437/500: Merge pull request #130 from nagy/simplify, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 9362a70d0b 468/500: nix-flake: Organize the library into outlines, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 241cc0881e 466/500: nix-flake.el: Init nix-flake command, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode dd0d1c0d0b 467/500: nix-flake: WIP: nix-flake-init, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode acf4fd09db 470/500: nix-flake: Add customization options, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7346057087 471/500: nix-flake: Show aliases in the registry as well,
ELPA Syncer <=
- [nongnu] elpa/nix-mode de85646434 486/500: Add dependabot.yml, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 186698599c 480/500: nix-flake: Set a prompt string, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 6712a66321 381/500: Fix yaml, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1c42c634bf 379/500: Allow missing git repo, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 38958e5203 413/500: Update install-nix-action in GitHub Action, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode cc60a0d027 417/500: Make nix-drv-mode a derived-mode of javascript-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0de9c70c89 429/500: Split up `nix-search` into two separate functions, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode e8e5211f6e 426/500: Merge pull request #122 from leungbk/def-obsol, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 98426b94e5 280/500: Add function to indent things in blocks for nix-indent-line, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 71fda1db41 373/500: add README section for nix-prettify-mode (#100), ELPA Syncer, 2022/01/29