added a shiny bash-autocomplete script

This commit is contained in:
Jack Andersen 2015-05-19 11:01:32 -10:00
parent d10c3a831d
commit 66d07af26e
12 changed files with 64 additions and 30 deletions

View File

@ -44,7 +44,7 @@ PROJECT_NUMBER =
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = "High-Level Extensible Combiner Language"
PROJECT_BRIEF = "High-Level Extensible Combiner Language and Resource Database"
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55

View File

@ -1,6 +1,5 @@
#ifndef MAIN_CPP
#error This file may only be included from main.cpp
#endif
#ifndef CTOOL_ADD
#define CTOOL_ADD
#include "CToolBase.hpp"
@ -15,3 +14,5 @@ public:
{
}
};
#endif // CTOOL_ADD

View File

@ -1,6 +1,5 @@
#ifndef MAIN_CPP
#error This file may only be included from main.cpp
#endif
#ifndef CTOOL_BASE
#define CTOOL_BASE
class CToolBase
{
@ -12,3 +11,4 @@ public:
virtual ~CToolBase() {}
};
#endif // CTOOL_BASE

View File

@ -1,6 +1,5 @@
#ifndef MAIN_CPP
#error This file may only be included from main.cpp
#endif
#ifndef CTOOL_CLEAN
#define CTOOL_CLEAN
#include "CToolBase.hpp"
@ -15,3 +14,5 @@ public:
{
}
};
#endif // CTOOL_CLEAN

View File

@ -1,6 +1,5 @@
#ifndef MAIN_CPP
#error This file may only be included from main.cpp
#endif
#ifndef CTOOL_COOK
#define CTOOL_COOK
#include "CToolBase.hpp"
@ -15,3 +14,5 @@ public:
{
}
};
#endif // CTOOL_COOK

View File

@ -1,6 +1,5 @@
#ifndef MAIN_CPP
#error This file may only be included from main.cpp
#endif
#ifndef CTOOL_GROUP
#define CTOOL_GROUP
#include "CToolBase.hpp"
@ -15,3 +14,5 @@ public:
{
}
};
#endif // CTOOL_GROUP

View File

@ -1,6 +1,5 @@
#ifndef MAIN_CPP
#error This file may only be included from main.cpp
#endif
#ifndef CTOOL_HELP
#define CTOOL_HELP
#include "CToolBase.hpp"
@ -15,3 +14,5 @@ public:
{
}
};
#endif // CTOOL_HELP

View File

@ -1,6 +1,5 @@
#ifndef MAIN_CPP
#error This file may only be included from main.cpp
#endif
#ifndef CTOOL_INIT
#define CTOOL_INIT
#include "CToolBase.hpp"
@ -15,3 +14,5 @@ public:
{
}
};
#endif // CTOOL_INIT

View File

@ -1,6 +1,5 @@
#ifndef MAIN_CPP
#error This file may only be included from main.cpp
#endif
#ifndef CTOOL_PACKAGE
#define CTOOL_PACKAGE
#include <vector>
#include <string>
@ -17,3 +16,5 @@ public:
{
}
};
#endif // CTOOL_PACKAGE

View File

@ -3,6 +3,7 @@
#include <HECLDatabase.hpp>
#define MAIN_CPP
#include "CToolBase.hpp"
#include "CToolInit.hpp"
#include "CToolAdd.hpp"
#include "CToolGroup.hpp"

26
hecl/extra/hecl_autocomplete.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
_hecl ()
{
local word=${COMP_WORDS[COMP_CWORD]}
local filecmds=(init add group cook clean package)
if [ $COMP_CWORD == 1 ]
then
COMPREPLY=($(compgen -W "${filecmds[*]} help" "${word}"))
return 0
elif [ $COMP_CWORD == 2 ]
then
case ${COMP_WORDS[1]} in
init|add|group|cook|clean|package)
COMPREPLY=($(compgen -f -- "${word}"))
;;
help)
COMPREPLY=($(compgen -W "${filecmds[*]}" "${word}"))
;;
esac
fi
}
complete -F _hecl hecl

View File

@ -296,6 +296,11 @@ public:
std::function<void(std::string&, LoadType, unsigned)> feedbackCb,
bool recursive=false)=0;
/**
* @brief Interrupts a cook in progress (call from SIGINT handler)
*/
virtual void interruptCook()=0;
/**
* @brief Delete cooked objects for file or directory
* @param path file or directory of intermediates to clean
@ -304,11 +309,6 @@ public:
*/
virtual bool cleanPath(const std::string& path, bool recursive=false)=0;
/**
* @brief Interrupts a cook in progress (call from SIGINT handler)
*/
virtual void interruptCook()=0;
};
/**