emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45004: closed ([PATCH shepherd] herd: Suggest alternatives when acti


From: GNU bug Tracking System
Subject: bug#45004: closed ([PATCH shepherd] herd: Suggest alternatives when action and service are likely swapped.)
Date: Fri, 02 Jun 2023 14:05:01 +0000

Your message dated Fri, 02 Jun 2023 16:04:46 +0200
with message-id <87cz2e55a9.fsf@gnu.org>
and subject line Re: bug#45004: [PATCH shepherd] herd: Suggest alternatives 
when action and service are likely swapped.
has caused the debbugs.gnu.org bug report #45004,
regarding [PATCH shepherd] herd: Suggest alternatives when action and service 
are likely swapped.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
45004: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45004
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH shepherd] herd: Suggest alternatives when action and service are likely swapped. Date: Wed, 2 Dec 2020 10:21:07 +0100
* modules/shepherd/script/herd.scm (run-command)[reply error]: Report a more
descriptive error if service could reasonably have been an action.
---
 modules/shepherd/scripts/herd.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/shepherd/scripts/herd.scm 
b/modules/shepherd/scripts/herd.scm
index 106de1e..a178f51 100644
--- a/modules/shepherd/scripts/herd.scm
+++ b/modules/shepherd/scripts/herd.scm
@@ -179,6 +179,15 @@ the daemon via SOCKET-FILE."
                 ('messages messages))
         (for-each display-line messages)
         (report-command-error error)
+        (match (list action service)
+          ((_ (or 'start 'stop 'status 'doc))
+           (report-error (l10n "did you mean 'herd ~a ~a'?")
+                         service action))
+          ((root (or 'help 'halt 'power-off 'load 'eval 'unload 'reload
+                     'daemonize 'persistency 'no-persistency 'cd 'restart))
+           (report-error (l10n "did you mean 'herd ~a ~a'?")
+                         service action))
+          ((_ _) *unspecified*))
         (exit 1))
        ((? eof-object?)
         ;; When stopping shepherd, we may get an EOF in lieu of a real reply,
-- 
2.29.2




--- End Message ---
--- Begin Message --- Subject: Re: bug#45004: [PATCH shepherd] herd: Suggest alternatives when action and service are likely swapped. Date: Fri, 02 Jun 2023 16:04:46 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Hey Liliana,

> * modules/shepherd/script/herd.scm (run-command)[reply error]: Report a more
> descriptive error if service could reasonably have been an action.

I found this old patch of yours, which I find very useful.  So… finally
applied as Shepherd commit b9b15db9e5bda27287706b6727c462df686e7621!

Thanks,
Ludo’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]