user input only works on the end of commands

Bug #638243 reported by Duane Hinnen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CLI Companion
Fix Released
Medium
Duane Hinnen

Bug Description

While adding more commands to the CLI Companion dictionary I noticed something. Commands that require a user to input a variable only works if the variable is at the end.

So this command (in .clicompanion format) runs great. Because the user argument is at the end of the command.
apropos :command/package : search the manual page names and descriptions

So take this entry (it is in the .clicompanion format)
cat file1 file2 | sort | uniq > file3 : file1 file2 file3 : combine, sort and remove duplicates from 2 files

The user needs to enter file1, file2, file3.

The current code:
            text = Companion.get_info(self, text)
            page_widget.feed_child(cmnd+" "+text+"\n") #send command w/ input

'text' being the users input that is returned from the Get Info Dialog Box. As you can see it is just added to the end. This works great for a lot of commands. But not all. If possible I would like to come up with a solution that handles user variables throughout, as well as command flags.

What should happen:
The user can enter a command like this for their 'command dictionary'

cat %s %s | sort | uniq > %s

When the command is ran they are prompted for the 3 variables.

Related branches

description: updated
Changed in clicompanion:
importance: Undecided → Medium
Changed in clicompanion:
assignee: nobody → duanedesign (duanedesign)
status: New → In Progress
Changed in clicompanion:
status: In Progress → Fix Committed
David Caro (dcaro)
Changed in clicompanion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.