[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/10: guix-install.sh: Add symbolic links for supported shell completio
From: |
guix-commits |
Subject: |
03/10: guix-install.sh: Add symbolic links for supported shell completions. |
Date: |
Fri, 16 Oct 2020 09:03:21 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit b3fba5ef043b161d05a9fdc371a32d89e9b22ea1
Author: zimoun <zimon.toutoune@gmail.com>
AuthorDate: Tue Oct 13 19:12:04 2020 +0200
guix-install.sh: Add symbolic links for supported shell completions.
Fixes <https://bugs.gnu.org/43744>.
* etc/guix-install.sh (sys_create_shell_completion): New function to add
system wide all the symlinks for supported shell completions.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
etc/guix-install.sh | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index eb7205a..f51a1b6 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -5,6 +5,7 @@
# Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
# Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
# Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
+# Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
#
# This file is part of GNU Guix.
#
@@ -459,6 +460,26 @@ export
XDG_DATA_DIRS="$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/share/:/us
EOF
}
+sys_create_shell_completion()
+{ # Symlink supported shell completions system-wide
+
+ var_guix=/var/guix/profiles/per-user/root/current-guix
+ bash_completion=/etc/bash_completion.d
+ zsh_completion=/usr/share/zsh/site-functions
+ fish_completion=/usr/share/fish/vendor_completions.d
+
+ { # Just in case
+ for dir_shell in $bash_completion $zsh_completion $fish_completion; do
+ [ -d "$dir_shell" ] || mkdir -p $dir_shell
+ done;
+
+ ln -sf ${var_guix}/etc/bash_completion.d/* "$bash_completion";
+ ln -sf ${var_guix}/share/zsh/site-functions/* "$zsh_completion";
+ ln -sf ${var_guix}/share/fish/vendor_completions.d/*
"$fish_completion"; } &&
+ _msg "${PAS}installed shell completion"
+}
+
+
welcome()
{
cat<<"EOF"
@@ -516,6 +537,7 @@ main()
sys_enable_guix_daemon
sys_authorize_build_farms
sys_create_init_profile
+ sys_create_shell_completion
_msg "${INF}cleaning up ${tmp_path}"
rm -r "${tmp_path}"
- branch master updated (83fc59b -> 27913a6), guix-commits, 2020/10/16
- 01/10: nls: Update., guix-commits, 2020/10/16
- 04/10: guix-install.sh: Check the service 'nscd' and suggest it., guix-commits, 2020/10/16
- 05/10: .guix-authorizations: Add m1gu3l., guix-commits, 2020/10/16
- 06/10: gnu: julia: Update to 1.5.2., guix-commits, 2020/10/16
- 03/10: guix-install.sh: Add symbolic links for supported shell completions.,
guix-commits <=
- 07/10: gnu: runc, skopeo, docker-cli, umoci: Don't 'chdir' in build phases., guix-commits, 2020/10/16
- 10/10: gnu: gnuzilla: Use 'assume-valid-file-name' where appropriate., guix-commits, 2020/10/16
- 08/10: gexp: Add 'assume-valid-file-name' syntax for use with 'local-file'., guix-commits, 2020/10/16
- 09/10: services: provenance: Wrap config file name in 'assume-valid-file-name'., guix-commits, 2020/10/16
- 02/10: nls: Update manual translations., guix-commits, 2020/10/16