user input only works on the end of commands
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.
'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
- Duane Hinnen: Approve
-
Diff: 237 lines (+87/-32)2 files modified.clicompanion (+23/-23)
clicompanion.py (+64/-9)
- David Caro (community): Needs Information
- Duane Hinnen: Needs Resubmitting
-
Diff: 5659 lines (+5448/-23) (has conflicts)25 files modified.bzrignore (+8/-0)
.clicompanion (+48/-23)
MANIFEST (+23/-0)
clicompanion (+66/-0)
clicompanion.1 (+61/-0)
clicompanionlib/__init__.py (+23/-0)
clicompanionlib/config.py (+353/-0)
clicompanionlib/helpers.py (+186/-0)
clicompanionlib/menus_buttons.py (+253/-0)
clicompanionlib/plugins.py (+249/-0)
clicompanionlib/preferences.py (+708/-0)
clicompanionlib/tabs.py (+598/-0)
clicompanionlib/utils.py (+269/-0)
clicompanionlib/view.py (+575/-0)
data/clicompanion.desktop (+7/-0)
data/clicompanion2.config.debian (+150/-0)
data/clicompanion2.config.ubuntu (+150/-0)
locale/clicompanion.pot (+155/-0)
plugins/CommandLineFU.py (+282/-0)
plugins/LaunchpadURL.py (+62/-0)
plugins/LocalCommandList.py (+808/-0)
plugins/StandardURLs.py (+91/-0)
plugins/__init__.py (+23/-0)
plugins/clfu.py (+243/-0)
setup.py (+57/-0)
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 |
Changed in clicompanion: | |
status: | Fix Committed → Fix Released |