# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details
# http://www.gnu.org/licenses/gpl-3.0.txt

from ..logging import make_logger
log = make_logger(__name__)

from ..singletons import cmdmgr
def commands():
    return tuple(cmdmgr.active_commands) + \
        tuple(cmdcls.alias for cmdcls in cmdmgr.active_commands)

    # candidates = []

    # for cmdcls in cmdmgr.active_commands:
    #     # Find matching command names
    #     if cmdcls.name.startswith(string):
    #         candidates.append(cmdcls.name)

    #     # Find matching aliases
    #     for alias in cmdcls.aliases:
    #         if alias.startswith(string):
    #             candidates.append(alias)

    # return candidates

