def beginEnterCommand(self): self.stdscr.erase() # first check if they are trying to enter command mode # but already have a command... if len(self.flags.getPresetCommand()): self.helperChrome.output(self.mode) (_, minY, _, maxY) = self.getChromeBoundaries() yStart = (maxY + minY) / 2 - 3 self.printProvidedCommandWarning(yStart) self.stdscr.refresh() self.getKey() self.mode = SELECT_MODE self.dirtyAll() return self.mode = COMMAND_MODE self.helperChrome.output(self.mode) logger.addEvent('enter_command_mode') command = self.showAndGetCommand() if len(command) == 0: # go back to selection mode and repaint self.mode = SELECT_MODE self.cursesAPI.noecho() self.dirtyAll() logger.addEvent('exit_command_mode') return lineObjs = self.getFilesToUse() output.execComposedCommand(command, lineObjs) sys.exit(0)
def beginEnterCommand(self): self.stdscr.erase() # first check if they are trying to enter command mode # but already have a command... if len(self.flags.getPresetCommand()): self.helperChrome.output(self.mode) (minX, minY, _, maxY) = self.getChromeBoundaries() yStart = (maxY + minY) / 2 - 3 self.printProvidedCommandWarning(yStart, minX) self.stdscr.refresh() self.getKey() self.mode = SELECT_MODE self.dirtyAll() return self.mode = COMMAND_MODE self.helperChrome.output(self.mode) logger.addEvent('enter_command_mode') command = self.showAndGetCommand() if len(command) == 0: # go back to selection mode and repaint self.mode = SELECT_MODE self.cursesAPI.noecho() self.dirtyAll() logger.addEvent('exit_command_mode') return lineObjs = self.getPathsToUse() output.execComposedCommand(command, lineObjs) sys.exit(0)
def onEnter(self): lineObjs = self.getPathsToUse() if not lineObjs: # nothing selected, assume we want hovered lineObjs = self.getHoveredPaths() logger.addEvent('selected_num_files', len(lineObjs)) # commands passed from the command line get used immediately presetCommand = self.flags.getPresetCommand() if len(presetCommand) > 0: output.execComposedCommand(presetCommand, lineObjs) else: output.editFiles(lineObjs) sys.exit(0)
def onEnter(self): lineObjs = self.getFilesToUse() if not lineObjs: # nothing selected, assume we want hovered lineObjs = self.getHoveredFiles() logger.addEvent('selected_num_files', len(lineObjs)) # commands passed from the command line get used immediately presetCommand = self.flags.getPresetCommand() if len(presetCommand) > 0: output.execComposedCommand(presetCommand, lineObjs) else: output.editFiles(lineObjs) sys.exit(0)
def beginEnterCommand(self): self.stdscr.clear() self.mode = COMMAND_MODE self.helperChrome.output(self.mode) logger.addEvent('enter_command_mode') command = self.showAndGetCommand() if len(command) == 0: # go back to selection mode and repaint self.mode = SELECT_MODE curses.noecho() self.dirtyLines() logger.addEvent('exit_command_mode') return lineObjs = self.getFilesToUse() output.execComposedCommand(command, lineObjs) sys.exit(0)
def beginEnterCommand(self): self.stdscr.clear() self.mode = COMMAND_MODE self.helperChrome.output(self.mode) logger.addEvent('enter_command_mode') command = self.showAndGetCommand() if len(command) == 0: # go back to selection mode and repaint self.mode = SELECT_MODE curses.noecho() self.dirtyLines() logger.addEvent('exit_command_mode') return lineObjs = self.getFilesToUse() output.execComposedCommand(command, lineObjs) sys.exit(0)
def executePreconfiguredCommand(self, command): lineObjs = self.getPathsToUse() output.execComposedCommand(command, lineObjs) sys.exit(0)
def executePreconfiguredCommand(self, command): lineObjs = self.getPathsToUse() output.execComposedCommand(command, lineObjs) sys.exit(0)