clicompanion-devs team mailing list archive
-
clicompanion-devs team
-
Mailing list archive
-
Message #00190
[Bug 638243] Re: user input only works on the end of commands
** Changed in: clicompanion
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of CLI
Companion Development Team, which is subscribed to CLI Companion.
https://bugs.launchpad.net/bugs/638243
Title:
user input only works on the end of commands
Status in CLI Companion:
Fix Released
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/clicompanion/+bug/638243/+subscriptions