[Lunar-commits] <moonbase> lunar, theedge: Adding tab completion for 'lunar unset'.
Stefan Wold
ratler at lunar-linux.org
Mon Jun 27 09:58:26 CEST 2011
commit 316ea784e82aedb22c32267db76889d55021c696
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Mon Jun 27 09:58:26 2011 +0200
lunar, theedge: Adding tab completion for 'lunar unset'.
- Added missing sed dependency
---
utils/lunar/DEPENDS | 1 +
utils/lunar/profile.d/lunar.rc | 4 +++-
utils/theedge/DEPENDS | 1 +
utils/theedge/profile.d/theedge.rc | 4 +++-
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/utils/lunar/DEPENDS b/utils/lunar/DEPENDS
index ca8f108..c0bc362 100644
--- a/utils/lunar/DEPENDS
+++ b/utils/lunar/DEPENDS
@@ -22,6 +22,7 @@ depends patch
depends net-tools
depends diffstat
depends xz
+depends sed
optional_depends "nano" "" "" "for a ultra-small editor"
optional_depends "lunaric-sound" "" "" "to have lunar signal events with sound"
diff --git a/utils/lunar/profile.d/lunar.rc b/utils/lunar/profile.d/lunar.rc
index 389ffb4..c781b50 100644
--- a/utils/lunar/profile.d/lunar.rc
+++ b/utils/lunar/profile.d/lunar.rc
@@ -10,7 +10,9 @@ _lunar ()
prev=${COMP_WORDS[COMP_CWORD-1]}
if [ $COMP_CWORD -eq 1 ] || [ "${prev:0:1}" = "-" ]; then
- COMPREPLY=( $( compgen -W 'prune renew update rebuild optimize fix nofix fixdepends set resurrect install remove hold unhold exile unexile' $cur ))
+ COMPREPLY=( $( compgen -W 'prune renew update rebuild optimize fix nofix fixdepends set resurrect install remove hold unhold exile unexile set unset' $cur ))
+ elif [ $COMP_CWORD -eq 2 -a $prev = "unset" ]; then
+ COMPREPLY=( $( compgen -W "`cat /etc/lunar/local/config | sed -rn 's;\s+(.*)=.*;\1;p'`" $cur ))
else
COMPREPLY=( $( compgen -f $cur ))
fi
diff --git a/utils/theedge/DEPENDS b/utils/theedge/DEPENDS
index cb29a8c..b4321a8 100644
--- a/utils/theedge/DEPENDS
+++ b/utils/theedge/DEPENDS
@@ -15,6 +15,7 @@ depends less
depends tar
depends wget
depends net-tools
+depends sed
optional_depends "nano" "" "" "for a ultra-small editor"
optional_depends "lunaric-sound" "" "" "to have lunar signal events with sound"
diff --git a/utils/theedge/profile.d/theedge.rc b/utils/theedge/profile.d/theedge.rc
index 389ffb4..c781b50 100644
--- a/utils/theedge/profile.d/theedge.rc
+++ b/utils/theedge/profile.d/theedge.rc
@@ -10,7 +10,9 @@ _lunar ()
prev=${COMP_WORDS[COMP_CWORD-1]}
if [ $COMP_CWORD -eq 1 ] || [ "${prev:0:1}" = "-" ]; then
- COMPREPLY=( $( compgen -W 'prune renew update rebuild optimize fix nofix fixdepends set resurrect install remove hold unhold exile unexile' $cur ))
+ COMPREPLY=( $( compgen -W 'prune renew update rebuild optimize fix nofix fixdepends set resurrect install remove hold unhold exile unexile set unset' $cur ))
+ elif [ $COMP_CWORD -eq 2 -a $prev = "unset" ]; then
+ COMPREPLY=( $( compgen -W "`cat /etc/lunar/local/config | sed -rn 's;\s+(.*)=.*;\1;p'`" $cur ))
else
COMPREPLY=( $( compgen -f $cur ))
fi
More information about the Lunar-commits
mailing list