[lxc-devel] [lxd/master] More clean filter for container names in bashcompl

overquota on Github lxc-bot at linuxcontainers.org
Wed Nov 23 17:41:37 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 1353 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20161123/7dbcf96a/attachment.bin>
-------------- next part --------------
From 2485fc4344be3bace8a805a97596aff8b7f22f64 Mon Sep 17 00:00:00 2001
From: Aleksei Arsenev <aarseniev at yandex-team.ru>
Date: Wed, 23 Nov 2016 20:33:22 +0300
Subject: [PATCH] More clean filter for container names in bashcompl

Signed-off-by: Aleksei Arsenev <aarseniev at yandex-team.ru>
---
 config/bash/lxd-client | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/bash/lxd-client b/config/bash/lxd-client
index 1726ce7..6191b5a 100644
--- a/config/bash/lxd-client
+++ b/config/bash/lxd-client
@@ -5,12 +5,12 @@ _have lxc && {
     {
       local state=$1
       local keys=$2
-      
+
       local cmd="lxc list --fast"
       [ -n "$state" ] && cmd="$cmd | grep -E '$state'"
 
       COMPREPLY=( $( compgen -W \
-        "$( eval $cmd | grep -Ev '(+--|NAME)' | awk '{print $2}' ) $keys" "$cur" )
+        "$( eval $cmd | grep -Ev '(\+--|NAME)' | awk '{print $2}' ) $keys" "$cur" )
       )
     }
 


More information about the lxc-devel mailing list