if the command has ":" character, the command gets broken into two

Bug #819038 reported by Gnm TR
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
CLI Companion
Fix Released
High
Marek Bardoński

Bug Description

I tried to record this

command.....: sshfs xnatty@192.168.1.5:/home/xnatty ~/xnatty
User input....:
Description..: this command mounts the remote computer

Closed the program.... and reopened it.
command was split into two at (:) character in the middle of the command. Second part was shown in User input field.
so the new fields were as follows:

command.....: sshfs xnatty@192.168.1.5
User input....: /home/xnatty ~/xnatty
Description..: :this command mounts the remote computer

I think the program uses (:) as a separator character between columns of data..
you may want to change it to some other (less used) character.
for your info...

Related branches

Revision history for this message
Gnm TR (gnmtr) wrote :

Sorry I forgot to mention that I encountered this problem while using 1.0-6~bzr83+p11~natty1 installed from the PPA.

Changed in clicompanion:
status: New → Confirmed
Revision history for this message
Marek Bardoński (bdfhjk) wrote :

Patch look good. I not tested it, but it should solve problem.

Nice work dcaro !

Changed in clicompanion:
importance: Undecided → High
status: Confirmed → In Progress
assignee: nobody → Marek Bardoński (bdfhjk)
Revision history for this message
Marek Bardoński (bdfhjk) wrote :

I checked it and bug appear on my computer.

I've tested Dcaro fix and it work for me.

NOTE: After pushing, you must remove old .clicompanion2 file if any exist.

Changed in clicompanion:
status: In Progress → Fix Committed
Revision history for this message
Jonathan Marsden (jmarsden) wrote :

Where is the config file format documented in the clicompanion source tree? Should a section be added to the man page documenting it?

On a related note: why does data/clicompanion2.config use ? for each parameter to be prompted for, but .clicompanion in the same source tree uses @ for the same purpose? Consistency would be nice. Again, where is this aspect of the file format documented? What happens if those characters should appear verbatim in a command in the library -- can they be escaped somehow?

How do people who already have customized command libraries from the earlier versions upgrade -- does this fix include automated conversion to the new file format?

In general, is using any single USASCII character as a field delimiter really appropriate? All ASCII characters are possible in command lines that people may want to add to clicompanion, so just picking a different one does not fully solve the underlying issue, does it? I suspect ut just makes a different set of commands impossible to store.

A more comprehensive fix may be to use a "real database" (sqlite perhaps?) to store this information. This could also allow future enhancements to tag each command entry with which packages it needs, which version of which distribution it works on, etc.

Overall, just changing from : to tab as the field delimiter does not look to me like a full solution to the underlying issue.

Revision history for this message
Marek Bardoński (bdfhjk) wrote : Re: [Bug 819038] Re: if the command has ":" character, the command gets broken into two

2011/11/20 Jonathan Marsden <email address hidden>

> Where is the config file format documented in the clicompanion source
> tree? Should a section be added to the man page documenting it?
>

Yes, that will be usefull for our users.

>
> On a related note: why does data/clicompanion2.config use ? for each
> parameter to be prompted for, but .clicompanion in the same source tree
> uses @ for the same purpose? Consistency would be nice. Again, where
> is this aspect of the file format documented? What happens if those
> characters should appear verbatim in a command in the library -- can
> they be escaped somehow?
>

I'm wrong, or .clicompanion is only for informationan purposes in trunk?

>
> How do people who already have customized command libraries from the
> earlier versions upgrade -- does this fix include automated conversion
> to the new file format?
>

Yes, conversion will be automatical.

>
> In general, is using any single USASCII character as a field delimiter
> really appropriate? All ASCII characters are possible in command lines
> that people may want to add to clicompanion, so just picking a different
> one does not fully solve the underlying issue, does it? I suspect ut
> just makes a different set of commands impossible to store.
>
> A more comprehensive fix may be to use a "real database" (sqlite
> perhaps?) to store this information. This could also allow future
> enhancements to tag each command entry with which packages it needs,
> which version of which distribution it works on, etc.
>

Yes, this is good idea and we should make database for 1.2 release.

>
> Overall, just changing from : to tab as the field delimiter does not
> look to me like a full solution to the underlying issue.
>

Your right. This is only quick fix.

>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/819038
>
> Title:
> if the command has ":" character, the command gets broken into two
>
> Status in CLI Companion:
> Fix Committed
>
> Bug description:
> I tried to record this
>
> command.....: sshfs xnatty@192.168.1.5:/home/xnatty ~/xnatty
> User input....:
> Description..: this command mounts the remote computer
>
> Closed the program.... and reopened it.
> command was split into two at (:) character in the middle of the command.
> Second part was shown in User input field.
> so the new fields were as follows:
>
> command.....: sshfs xnatty@192.168.1.5
> User input....: /home/xnatty ~/xnatty
> Description..: :this command mounts the remote computer
>
> I think the program uses (:) as a separator character between columns of
> data..
> you may want to change it to some other (less used) character.
> for your info...
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/clicompanion/+bug/819038/+subscriptions
>

David Caro (dcaro)
Changed in clicompanion:
status: Fix Committed → Invalid
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints

Remote bug watches

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