Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
ca9b6e0c by Raymond Toy at 2023-03-01T03:43:18+00:00
Fix #163: Add -version command line switch
- - - - -
3f4e2d0c by Raymond Toy at 2023-03-01T03:43:19+00:00
Merge branch 'issue-163-add-command-line-version' into 'master'
Fix #163: Add -version command line switch
Closes #163
See merge request cmucl/cmucl!112
- - - - -
3 changed files:
- src/code/commandline.lisp
- src/code/save.lisp
- src/i18n/locale/cmucl.pot
Changes:
=====================================
src/code/commandline.lisp
=====================================
@@ -394,3 +394,17 @@
(defswitch "-help" #'help-switch-demon
"Same as -help.")
+
+(defun version-switch-demon (switch)
+ (declare (ignore switch))
+ (format t "~A~%" (lisp-implementation-version))
+ (ext:quit))
+
+(defswitch "version" #'version-switch-demon
+ "Prints the cmucl version and exits")
+
+;; Make --version work for the benefit of those who are accustomed to
+;; GNU software.
+(defswitch "-version" #'version-switch-demon
+ "Prints the cmucl version and exits; same as -version")
+
=====================================
src/code/save.lisp
=====================================
@@ -336,8 +336,12 @@
*gc-verbose* nil))
(when (and process-command-line
(or (find-switch "help")
- (find-switch "-help")))
- ;; Don't load any init files if -help or --help is given
+ (find-switch "-help")
+ (find-switch "version")
+ (find-switch "-version")))
+ ;; Don't load any init files if -help, --help,
+ ;; -version, or --version is given. These exit right
+ ;; away, so loading the init file is wasteful.
(setf site-init nil)
(setf load-init-file nil))
(when (and site-init
=====================================
src/i18n/locale/cmucl.pot
=====================================
@@ -6149,6 +6149,10 @@ msgstr ""
msgid "Same as -help."
msgstr ""
+#: src/code/commandline.lisp
+msgid "Prints the cmucl version and exits"
+msgstr ""
+
#: src/code/env-access.lisp
msgid ""
"Returns information about the symbol VAR in the lexical environment ENV.\n"
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/68ef4c5b2708fd3c26e93d…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/68ef4c5b2708fd3c26e93d…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-163-add-command-line-version at cmucl / cmucl
Commits:
17c15601 by Carl S. Shapiro at 2023-03-01T03:10:22+00:00
Better comment.
- - - - -
1 changed file:
- src/code/commandline.lisp
Changes:
=====================================
src/code/commandline.lisp
=====================================
@@ -403,8 +403,8 @@
(defswitch "version" #'version-switch-demon
"Prints the cmucl version and exits")
-;; Make --version work too since that's a common command line option
-;; for GNU software.
+;; Make --version work for the benefit of those who are accustomed to
+;; GNU software.
(defswitch "-version" #'version-switch-demon
"Prints the cmucl version and exits; same as -version")
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/17c15601aa9e17e7ce79de5…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/17c15601aa9e17e7ce79de5…
You're receiving this email because of your account on gitlab.common-lisp.net.