1827 ): |
1827 ): |
1828 self.__setHistoryIndex(index=-1) |
1828 self.__setHistoryIndex(index=-1) |
1829 else: |
1829 else: |
1830 self.__setHistoryIndex(historyIndex) |
1830 self.__setHistoryIndex(historyIndex) |
1831 |
1831 |
|
1832 # TODO: add a '%help' command listing available % commands |
|
1833 # TODO: add '%history [n]' command to show the 'n' most recently used |
|
1834 # commands (default: n = 10) |
1832 if cmd.startswith("%"): |
1835 if cmd.startswith("%"): |
1833 if cmd == "%start" or cmd.startswith("%start "): |
1836 if cmd == "%start" or cmd.startswith("%start "): |
1834 if not self.passive: |
1837 if not self.passive: |
1835 cmdList = cmd.split(None, 1) |
1838 cmdList = cmd.split(None, 1) |
1836 if len(cmdList) < 2: |
1839 if len(cmdList) < 2: |
1837 self.dbs.startClient(False) |
1840 self.dbs.startClient(False) |
1838 # start default backend |
1841 # start default backend |
1839 else: |
1842 else: |
1840 venvName = cmdList[1] |
1843 venvName = cmdList[1] |
1841 if venvName == self.tr("Project"): |
1844 if venvName in ( |
|
1845 self.tr("Project"), |
|
1846 self.tr("Project").lower(), |
|
1847 "Project", |
|
1848 "project", |
|
1849 ): |
1842 if self.__project.isOpen(): |
1850 if self.__project.isOpen(): |
1843 self.dbs.startClient( |
1851 self.dbs.startClient( |
1844 False, |
1852 False, |
1845 forProject=True, |
1853 forProject=True, |
1846 workingDir=self.__project.getProjectPath(), |
1854 workingDir=self.__project.getProjectPath(), |