summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-10-31 12:47:14 +0200
committerEfraim Flashner <efraim@flashner.co.il>2021-10-31 14:49:47 +0200
commitbc5155b952ae8bdbc56aded4d8d39768b4e2a7d4 (patch)
tree6b55475d86c522543384dea7d1ab66bba32af63e /etc
parentdac8d013bd1fc7f57b8ba3582eef6e0e01b23dfd (diff)
parent4e5000114ec01b5e92a87c52f2a10f9ba7a601c8 (diff)
downloadguix-patches-bc5155b952ae8bdbc56aded4d8d39768b4e2a7d4.tar
guix-patches-bc5155b952ae8bdbc56aded4d8d39768b4e2a7d4.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates-frozen
Diffstat (limited to 'etc')
-rw-r--r--etc/completion/bash/guix18
-rw-r--r--etc/completion/zsh/_guix1
-rw-r--r--etc/news.scm91
3 files changed, 104 insertions, 6 deletions
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 87d9911e53..6a11e1b23b 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -1,5 +1,5 @@
# GNU Guix --- Functional package management for GNU
-# Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2021 Tobias Geerinck-Rice <me@tobias.gr>
#
# This file is part of GNU Guix.
@@ -28,10 +28,11 @@ _guix_complete_command ()
if [ -z "$_guix_commands" ]
then
# Cache the list of commands to speed things up.
- _guix_commands="$(guix --help 2> /dev/null \
+ _guix_commands="$(${COMP_WORDS[0]} --help 2> /dev/null \
| grep '^ ' \
| sed '-es/^ *\([a-z-]\+\).*$/\1/g')"
fi
+
COMPREPLY+=($(compgen -W "$_guix_commands" -- "$word_at_point"))
}
@@ -71,10 +72,16 @@ _guix_complete_option ()
{
local command="${COMP_WORDS[$1]}"
local subcommand="${COMP_WORDS[$(($1 + 1))]}"
- if _guix_is_option "$subcommand"
+
+ if [ $1 -le 1 ]
+ then
+ command=""
+ subcommand=""
+ elif _guix_is_option "$subcommand"
then
subcommand=""
fi
+
local options="$(${COMP_WORDS[0]} $command $subcommand --help 2> /dev/null \
| grep '^ \+-' \
| sed -e's/^.*--\([a-zA-Z0-9_-]\+\)\(=\?\).*/--\1\2/g')"
@@ -215,7 +222,7 @@ _guix_complete ()
if [[ "$word" = "--" ]]
then
case "$command" in
- environment)
+ environment|shell)
break
;;
time-machine)
@@ -228,6 +235,7 @@ _guix_complete ()
case $COMP_CWORD in
$command_index)
_guix_complete_command
+ _guix_complete_option 0 "$word_at_point"
;;
*)
if [[ "$command" = "package" ]]
@@ -265,7 +273,7 @@ _guix_complete ()
else
_guix_complete_available_package_or_store_file "$word_at_point"
fi
- elif [[ "$command" = "environment" ]]
+ elif [[ "$command" = "environment" || "$command" = "shell" ]]
then
if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p || _guix_is_dash_l
then
diff --git a/etc/completion/zsh/_guix b/etc/completion/zsh/_guix
index bbc13c6ca1..9b1f16c664 100644
--- a/etc/completion/zsh/_guix
+++ b/etc/completion/zsh/_guix
@@ -58,6 +58,7 @@ _guix_list_available_packages()
if ( [[ ${+_guix_available_packages} -eq 0 ]] || _cache_invalid GUIX_AVAILABLE_PACKAGES ) \
&& ! _retrieve_cache GUIX_AVAILABLE_PACKAGES; then
_guix_available_packages=(${${(f)"$(guix package -A | cut -f1)"}})
+ _guix_available_packages=("${_guix_available_packages[@]// /}")
_store_cache GUIX_AVAILABLE_PACKAGES _guix_available_packages
fi
}
diff --git a/etc/news.scm b/etc/news.scm
index d3a56865b6..494c78eded 100644
--- a/etc/news.scm
+++ b/etc/news.scm
@@ -23,7 +23,96 @@
(channel-news
(version 0)
-(entry (commit "a2324d8b56eabf8117bca220a507cc791edffd2e")
+
+ (entry (commit "746584e0ca200e7bf51b139ceb36c19ea81d6ef1")
+ (title
+ (en "New @command{guix shell} command supersedes @command{guix
+environment}")
+ (de "Neuer Befehl @command{guix shell} löst @command{guix
+environment} ab")
+ (fr "Nouvelle commande @command{guix shell} en remplacement de
+@command{guix environment}"))
+ (body
+ (en "A new @command{guix shell} command is now available. It is
+similar to @command{guix environment}, but with a more convenient interface
+(@command{guix environment} is deprecated but will remain available until May,
+1st 2023). The main difference compared to @command{guix environment} is that
+the \"ad hoc\" mode is the default. Thus, to create an interactive
+environment containing Python, NumPy, and SciPy, you would run:
+
+@example
+guix shell python python-numpy python-scipy
+@end example
+
+To get a development environment for, say, Inkscape, pass the @option{-D}
+flag:
+
+@example
+guix shell -D inkscape
+@end example
+
+Another difference is that running @command{guix shell} without arguments
+loads @file{manifest.scm} or @file{guix.scm} for the current directory or an
+ancestor, provided you allowed it. The command maintains a cache to speed up
+access to such environments.
+
+Run @command{info \"(guix) Invoking guix shell\"} for more information.")
+ (de "Ein neuer Befehl @command{guix shell} ist ab jetzt
+verfügbar. Er ähnelt @command{guix environment}, ist aber leichter zu
+benutzen (@command{guix environment} gilt als veraltet, bleibt aber
+bis zum 1.@: Mai 2023 verfügbar). Der größte Unterschied ist, dass das
+Verhalten mit @option{--ad-hoc} nun der Normalfall ist. D.h.@: um eine
+interaktive Umgebung mit Python, NumPy und SciPy zu bekommen, lautet
+der Befehl:
+
+@example
+guix shell python python-numpy python-scipy
+@end example
+
+Wenn Sie eine Entwicklungsumgebung für, sagen wir, Inkscape schaffen
+wollen, übergeben Sie die Option @option{-D}:
+
+@example
+guix shell -D inkscape
+@end example
+
+Noch ein Unterschied ist, dass wenn Sie @command{guix shell} ohne
+Argumente ausführen, @file{manifest.scm} oder @file{guix.scm} aus dem
+aktuellen Arbeitsverzeichnis oder einem übergeordneten Verzeichnis
+geladen wird, wenn Sie die Berechtigung dazu erteilt haben. Für den
+Befehl wird ein Zwischenspeicher vorgehalten, damit Sie schneller auf
+solche Umgebungen zugreifen können.
+
+Führen Sie @command{info \"(guix) Invoking guix shell\"} aus, um mehr
+zu erfahren.")
+ (fr "Une nouvelle commande, @command{guix shell}, est maintenant
+disponible. Elle est similaire à @command{guix environment}, mais avec une
+interface plus pratique (@command{guix environment} est désuet mais restera
+disponible jusqu'au 1er mai 2023). La principale différence par rapport à
+@command{guix environment} est que le mode par défaut est le mode \"ad hoc\".
+Pour créer un environnement interactif contenant Python, NumPy et SciPy, il
+faut donc lancer :
+
+@example
+guix shell python python-numpy python-scipy
+@end example
+
+Pour obtenir un environnement de développement pour Inkscape, par exemple,
+passer l'option @option{-D} :
+
+@example
+guix shell -D inkscape
+@end example
+
+Une autre différence est qu'en lançant @command{guix shell} sans argument, le
+fichier @file{manifest.scm} ou @file{guix.scm} du répertoire courant ou d'un
+parent est automatiquement chargé, à condition de l'avoir autorisé. La
+commande garde un cache pour accélérer l'accès à ces environnements.
+
+Lancer @command{info \"(guix.fr) Invoquer guix shell\"} pour plus
+d'informations.")))
+
+ (entry (commit "a2324d8b56eabf8117bca220a507cc791edffd2e")
(title
(en "Guix Home is a part of GNU Guix")
(de "Guix Home ist jetzt Teil von GNU Guix")