From da8957aace8c5ec5daf0e3b13b28722b28c79180 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Mon, 28 Oct 2013 05:26:59 +0800 Subject: [PATCH] Some boilerplate code for experimenting --- pkg/tmuxp.bash | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkg/tmuxp.bash b/pkg/tmuxp.bash index 590d1c9d7c5..3d16af8cc79 100755 --- a/pkg/tmuxp.bash +++ b/pkg/tmuxp.bash @@ -1,3 +1,25 @@ #!/usr/bin/env bash +_python_argcomplete() { + local IFS='\013' + COMPREPLY=( $(IFS="$IFS" \ + COMP_LINE="$COMP_LINE" \ + COMP_POINT="$COMP_POINT" \ + _ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" \ + _ARGCOMPLETE=1 \ + "$1" 8>&1 9>&2 1>/dev/null 2>/dev/null) ) + if [[ $? != 0 ]]; then + unset COMPREPLY + fi +} + + + +# SHELLNAME=`lsof -p $$ | awk '(NR==2) {print $1}'` + +# if [ $SHELLNAME = "bash" ]; then +# elif [ $SHELLNAME = "zsh" ]; then +# elif [ $SHELLNAME = "tcsh" ]; then +# fi + eval "$(register-python-argcomplete tmuxp)"