The aliases.cpp
File Reference
Included Headers
Classes Index
struct | AliasInfo |
struct | Marker |
Typedefs Index
using | AliasOverloads = std::unordered_map< int, AliasInfo > |
using | AliasInfoMap = std::unordered_map< std::string, AliasOverloads > |
Functions Index
static std::string | expandAliasRec (StringUnorderedSet &aliasesProcessed, std::string_view s, bool allowRecursion=FALSE) |
static int | countAliasArguments (std::string_view args, std::string_view sep) |
static std::string | extractAliasArgs (std::string_view args) |
static std::string | expandAlias (std::string_view aliasName, std::string_view aliasValue) |
static void | addValidAliasToMap (std::string_view alias) |
static std::string | escapeAlias (std::string_view value) |
void | readAliases () |
static size_t | findEndOfCommand (std::string_view s) |
For a string s that starts with a command name, returns the character offset within that string representing the first character after the command. More... | |
static std::string | replaceAliasArguments (StringUnorderedSet &aliasesProcessed, std::string_view aliasValue, std::string_view argList, std::string_view sep) |
Replaces the markers in an alias definition aliasValue with the corresponding values found in the comma separated argument list argList and the returns the result after recursive alias expansion. More... | |
static std::string | escapeSeparators (const std::string &s, const std::string &sep) |
std::string | resolveAliasCmd (std::string_view aliasCmd) |
bool | isAliasCmd (std::string_view aliasCmd) |
Variables Index
static AliasInfoMap | g_aliasInfoMap |
Typedefs
AliasInfoMap
|
Definition at line 40 of file aliases.cpp.
AliasOverloads
|
Definition at line 39 of file aliases.cpp.
Functions
addValidAliasToMap()
| static |
Definition at line 56 of file aliases.cpp.
References Debug::Alias, err, g_aliasInfoMap, Debug::print, reg::search and stripWhiteSpace.
Referenced by readAliases.
countAliasArguments()
| static |
Definition at line 450 of file aliases.cpp.
Reference findEndOfCommand.
Referenced by expandAliasRec.
escapeAlias()
| static |
Definition at line 160 of file aliases.cpp.
Reference substituteStringView.
Referenced by readAliases.
escapeSeparators()
| static |
Definition at line 323 of file aliases.cpp.
Referenced by expandAliasRec.
expandAlias()
| static |
Definition at line 514 of file aliases.cpp.
References Debug::Alias, expandAliasRec and Debug::print.
Referenced by readAliases.
expandAliasRec()
| static |
Definition at line 344 of file aliases.cpp.
References countAliasArguments, escapeSeparators, expandAliasRec, extractAliasArgs, g_aliasInfoMap, replaceAliasArguments and reg::search.
Referenced by expandAlias, expandAliasRec, replaceAliasArguments and resolveAliasCmd.
extractAliasArgs()
| static |
Definition at line 474 of file aliases.cpp.
Referenced by expandAliasRec and findEndOfCommand.
findEndOfCommand()
| static |
For a string s that starts with a command name, returns the character offset within that string representing the first character after the command.
For an alias with argument, this is the offset to the character just after the argument list.
Examples:
- s=="a b" returns 1
- s=="a{2,3} b" returns 6 = s=="#" returns 0
Definition at line 214 of file aliases.cpp.
References extractAliasArgs and isId.
Referenced by countAliasArguments and replaceAliasArguments.
isAliasCmd()
|
Definition at line 528 of file aliases.cpp.
Reference g_aliasInfoMap.
Referenced by DocPara::handleCommand.
readAliases()
|
Definition at line 170 of file aliases.cpp.
References addValidAliasToMap, Config_getList, escapeAlias, expandAlias and g_aliasInfoMap.
Referenced by adjustConfiguration.
replaceAliasArguments()
| static |
Replaces the markers in an alias definition aliasValue with the corresponding values found in the comma separated argument list argList and the returns the result after recursive alias expansion.
Definition at line 230 of file aliases.cpp.
References expandAliasRec, findEndOfCommand and substituteInplace.
Referenced by expandAliasRec.
resolveAliasCmd()
|
Definition at line 504 of file aliases.cpp.
References Debug::Alias, expandAliasRec and Debug::print.
Referenced by replaceAliases.
Variables
g_aliasInfoMap
| static |
Definition at line 52 of file aliases.cpp.
Referenced by addValidAliasToMap, expandAliasRec, isAliasCmd and readAliases.
Generated via doxygen2docusaurus by Doxygen 1.14.0.