From a13db62a4da06426cf2eb2376d1a3723b5ee52d5 Mon Sep 17 00:00:00 2001 From: Vasily Postnicov Date: Fri, 14 Dec 2018 20:01:53 +0300 Subject: [PATCH] READ-ONE-LINE: Turn COMPLETIONS into a keyword argument This keeps READ-ONE-line backwards compatible to changes prior dae0422811771d179077b9336618f2b19be85b7b. Currently both ARGUMENT-POP-OR-READ and ARGUMENT-POP-REST-OR-READ are still being called with the previous lambda list. Update the calls to the READ-ONE-LINE that used the 'new' lambda list, COMPLETING-READ and YES-OR-NO-P. Closes #538 --- input.lisp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/input.lisp b/input.lisp index b698a368..7904b35f 100644 --- a/input.lisp +++ b/input.lisp @@ -307,10 +307,13 @@ passed the substring to complete on and is expected to return a list of matches. If require-match argument is non-nil then the input must match with an element of the completions." (check-type completions (or list function symbol)) - (let ((line (read-one-line screen prompt completions :initial-input initial-input :require-match require-match))) + (let ((line (read-one-line screen prompt + :completions completions + :initial-input initial-input + :require-match require-match))) (when line (string-trim " " line)))) -(defun read-one-line (screen prompt completions &key (initial-input "") require-match password) +(defun read-one-line (screen prompt &key completions (initial-input "") require-match password) "Read a line of input through stumpwm and return it. Returns nil if the user aborted." (let ((*input-last-command* nil) (*input-completions* completions) @@ -842,6 +845,7 @@ user presses 'y'" user presses 'yes'" (loop for line = (read-one-line (current-screen) (format nil "~a(yes or no) " message) + :completions '("yes" "no")) until (find line '("yes" "no") :test 'string-equal) do (message "Please answer yes or no") 37ccb81947c790fb8f48b0d49ff1dd4903d62'>system.scm
AgeCommit message (Expand)Author
2024-05-15system: Do not delete all nss-certs packages when they are the same object....Maxim Cournoyer
2024-04-28system: Fix duplicate nss-certs check....nathan
2024-04-26system: Warn when multiple nss-certs packages are used....Maxim Cournoyer
2024-04-18system: Add 'nss-certs' to %base-packages-networking....Jacob Hrbek
2024-04-17gnu: ath9k-htc-firmware: Split package....Jean-Pierre De Jesus DIAZ
2024-03-22system, home: Validate ‘services’ field value....Ludovic Courtès
2024-02-19system: Omit “root=” kernel argument when root device is “none”....Nicolas Graves
2024-01-08system: hurd: Use the Shepherd 0.10.x....Ludovic Courtès
2023-12-25gnu: Adjust to removing ed.scm and nano.scm...Efraim Flashner
2023-07-30system: Fix a blown FUSE....Tobias Geerinckx-Rice
2023-07-23gnu: fuse@3: Bind to default FUSE variable....Tobias Geerinckx-Rice
2023-07-13system: hurd: Boot with pci.arbiter and rumpdisk....Janneke Nieuwenhuizen
2023-05-10system: Fix reference to Hurd bug in comment....Ludovic Courtès
2023-04-14Merge branch 'master' into core-updates....Maxim Cournoyer