[lxc-devel] [lxd/master] Improve bash completions
yura-pakhuchiy on Github
lxc-bot at linuxcontainers.org
Sat Mar 26 14:37:11 UTC 2016
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 533 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160326/b9127a49/attachment.bin>
-------------- next part --------------
From 64ca67491083b387d6a237b5189cb079b785d01a Mon Sep 17 00:00:00 2001
From: Yura Pakhuchiy <pakhuchiy at gmail.com>
Date: Sat, 26 Mar 2016 21:30:38 +0700
Subject: [PATCH] Improve bash completions
* Fix `lxc file` completion.
* Fallback to default bash file/path completion if we do not provide
any. Useful with `lxc file push` and `lxc file pull`, maybe with
others.
Signed-off-by: Yura Pakhuchiy <pakhuchiy at gmail.com>
---
config/bash/lxd-client | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/config/bash/lxd-client b/config/bash/lxd-client
index 7cd701b..aad6407 100644
--- a/config/bash/lxd-client
+++ b/config/bash/lxd-client
@@ -40,8 +40,8 @@ _have lxc && {
"exec")
_lxd_names
;;
- "exec")
- COMPREPLY=( $(compgen -W "pull push" -- $cur) )
+ "file")
+ COMPREPLY=( $(compgen -W "pull push edit" -- $cur) )
;;
"help")
COMPREPLY=( $(compgen -W "$lxc_cmds" -- $cur) )
@@ -91,5 +91,5 @@ _have lxc && {
return 0
}
- complete -F _lxd_complete lxc
+ complete -o default -F _lxd_complete lxc
}
More information about the lxc-devel
mailing list