show, search: Add '--load-path'.

* guix/scripts/search.scm (show-help, %options): Add -L/--load-path.
* guix/scripts/show.scm (show-help, %options): Add -L/--load-path.
master
Ludovic Courtès 2019-09-23 21:22:28 +02:00
parent a2f6f3b199
commit 4f8c29a75c
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 20 additions and 2 deletions

View File

@ -19,6 +19,8 @@
(define-module (guix scripts search)
#:use-module (guix ui)
#:use-module (guix scripts package)
#:use-module ((guix scripts build)
#:select (%standard-build-options))
#:use-module (guix scripts)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
@ -36,6 +38,9 @@ This is an alias for 'guix package -s'.\n"))
(display (G_ "
-V, --version display version information and exit"))
(newline)
(display (G_ "
-L, --load-path=DIR prepend DIR to the package module search path"))
(newline)
(show-bug-report-information))
(define %options
@ -46,7 +51,11 @@ This is an alias for 'guix package -s'.\n"))
(exit 0)))
(option '(#\V "version") #f #f
(lambda args
(show-version-and-exit "guix search")))))
(show-version-and-exit "guix search")))
(find (lambda (option)
(member "load-path" (option-names option)))
%standard-build-options)))
(define (guix-search . args)
(define (handle-argument arg result)

View File

@ -19,6 +19,8 @@
(define-module (guix scripts show)
#:use-module (guix ui)
#:use-module (guix scripts package)
#:use-module ((guix scripts build)
#:select (%standard-build-options))
#:use-module (guix scripts)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
@ -36,6 +38,9 @@ This is an alias for 'guix package --show='.\n"))
(display (G_ "
-V, --version display version information and exit"))
(newline)
(display (G_ "
-L, --load-path=DIR prepend DIR to the package module search path"))
(newline)
(show-bug-report-information))
(define %options
@ -46,7 +51,11 @@ This is an alias for 'guix package --show='.\n"))
(exit 0)))
(option '(#\V "version") #f #f
(lambda args
(show-version-and-exit "guix show")))))
(show-version-and-exit "guix show")))
(find (lambda (option)
(member "load-path" (option-names option)))
%standard-build-options)))
(define (guix-show . args)
(define (handle-argument arg result)