From dca58219584c1163a9fbf88fccea885eb53bf2af Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 4 Mar 2019 14:19:55 +0100 Subject: environment: Rename '--inherit' to '--preserve'. Suggested by Eric Bavier and Ricardo Wurmus. * guix/scripts/environment.scm (show-help, %options): Emit a deprecation warning for "--inherit" and add -E/--preserve. * tests/guix-environment.sh: Adjust accordingly. * doc/guix.texi (Invoking guix environment): Update accordingly. --- guix/scripts/environment.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'guix/scripts') diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 0cf7b3fd5e..63f6129279 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -141,7 +141,7 @@ (define (show-help) (display (G_ " --pure unset existing environment variables")) (display (G_ " - --inherit=REGEXP inherit environment variables that match REGEXP")) + -E, --preserve=REGEXP preserve environment variables that match REGEXP")) (display (G_ " --search-paths display needed environment variable definitions")) (display (G_ " @@ -215,11 +215,18 @@ (define %options (option '("pure") #f #f (lambda (opt name arg result) (alist-cons 'pure #t result))) - (option '("inherit") #t #f + (option '(#\E "preserve") #t #f (lambda (opt name arg result) (alist-cons 'inherit-regexp (make-regexp* arg) result))) + (option '("inherit") #t #f ;deprecated + (lambda (opt name arg result) + (warning (G_ "'--inherit' is deprecated, \ +use '--preserve' instead~%")) + (alist-cons 'inherit-regexp + (make-regexp* arg) + result))) (option '("search-paths") #f #f (lambda (opt name arg result) (alist-cons 'search-paths #t result))) -- cgit v1.2.3