From b01c6fea5c78d51746343d66ee4db1a4235262e6 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 28 Jul 2015 18:43:49 +0200 Subject: [PATCH 1/2] try to sent built notifications to slack --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index deadb1c6f0..52f95fae12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,3 +49,6 @@ notifications: on_success: change on_failure: always on_start: false + slack: + secure: JrnDfdroyURrS85HIVsI4xw82taol+lvOJxduxz4T8mQuckaE3ECRYcxX7MzLJfjpeSLST5kttUiZBckHdZ/pnmraZlQ+1/b1VE6k5hFzkbeM0ShjXKTxHdudXaJKuENunMxDAjVWaBaTTh/iy8ZZbKUYQtWLtLfw3xa5zCKVaQ= + From f998f217bc10fe3f8ec2a513769390129b7812fc Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 28 Jul 2015 22:42:00 +0200 Subject: [PATCH 2/2] added completions for fish shell --- config/build_completions.sh | 56 -------------------------------- config/build_completions_bash.sh | 36 ++++++++++++++++++++ 2 files changed, 36 insertions(+), 56 deletions(-) delete mode 100755 config/build_completions.sh create mode 100755 config/build_completions_bash.sh diff --git a/config/build_completions.sh b/config/build_completions.sh deleted file mode 100755 index b35d0ce038..0000000000 --- a/config/build_completions.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -if [[ "$1" == "" ]]; then - echo "usage $0 outfile" - exit 1 -fi -out="$1" - -rm -f completions-template - -cat << 'EOF' > completions-template -_PROGNAME() -{ - local cur prev opts - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - opts="PROGOPTS" - - if [[ ${cur} == -* ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi -} - -complete -o default -F _PROGNAME PROGNAME - -EOF - - -echo "" > $out - -for progname in arangob arangosh arangoimp arangodump arangorestore arangod - do - # find the executable - # check if the executable exists - if [[ -f "bin/$progname" ]]; then - executable="bin/$progname" - - # setup the help command string - command="--help" - if [ "x$progname" == "xarangod" ]; then - command="--help-all" - fi - - # set up the list of completions for the executable - completions="`\"$executable\" $command | grep -o \"^\\ \\+--[a-z-]\\+\\(\\.[a-z0-9-]\\+\\)\\?\" | xargs`" - - sed -e "s/PROGNAME/$progname/g" -e "s/PROGOPTS/$completions/g" completions-template >> $out - fi - done - -rm -f completions-template - -echo "completions stored in file $out" -echo "now copy this file to /etc/bash_completion.d/arangodb" diff --git a/config/build_completions_bash.sh b/config/build_completions_bash.sh new file mode 100755 index 0000000000..99552cc5da --- /dev/null +++ b/config/build_completions_bash.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +if [[ "$1" == "" ]]; then + echo "usage $0 outfile" + exit 1 +fi +out="$1" + +echo "" > $out + +for progname in arangob arangosh arangoimp arangodump arangorestore arangod + do + # find the executable + # check if the executable exists + if [[ -f "bin/$progname" ]]; then + executable="bin/$progname" + + # setup the help command string + command="--help" + if [ "x$progname" == "xarangod" ]; then + command="--help-all" + fi + + # set up the list of completions for the executable + # completions="`\"$executable\" $command | grep -o \"^\\ \\+--[a-z-]\\+\\(\\.[a-z0-9-]\\+\\)\\?\" | sed -e \"s/^/complete --command $progname -a /g\"`" + echo "# completions for $progname" >> "$out" + + completions="`\"$executable\" $command`" + (echo "$completions" | grep "^ " | awk '/^ --/{if (x)print x;x="";}{x=(!x)?$0:x" "$0;}END{print x;}' | sed -e "s/ \+/ /g" | sed -e "s/(default:.*)//g" | sed -e "s/(current:.*)//g" | sed -e "s/<[a-zA-Z0-9]\+>//g" | tr -d "'" | sed -e "s/^ \+--\([a-zA-Z0-9.\-]\+\) \+\(.\+\)$/complete --command $progname -l '\\1' -d '\\2'/g" | sed -e "s/ \+'$/'/g") >> "$out" + + echo "" >> "$out" + fi + done + +echo "completions stored in file $out" +echo "now copy this file to /etc/bash_completion.d/arangodb"