summaryrefslogtreecommitdiff
path: root/guix/scripts/environment.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-03-04 14:19:55 +0100
committerLudovic Courtès <ludo@gnu.org>2019-03-04 15:22:59 +0100
commitdca58219584c1163a9fbf88fccea885eb53bf2af (patch)
treeba2d2992b2e638a8fb07c600c8a401a71ced001d /guix/scripts/environment.scm
parentbab9cc4aff09a14fdd4178c479becf932992b5b5 (diff)
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.
Diffstat (limited to 'guix/scripts/environment.scm')
-rw-r--r--guix/scripts/environment.scm11
1 files changed, 9 insertions, 2 deletions
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 @@ COMMAND or an interactive shell in that environment.\n"))
(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 @@ COMMAND or an interactive shell in that environment.\n"))
(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)))