You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The lack of this functionality is occasionally annoying. ppl post ought to work like email and phone somehow, so that contacts can have more than one postal address each.
The only thing standing in the way of this right now is my uncertainty regarding unique identifiers for postal addresses. In order to store multiple addresses, there needs to be a way to identify each address uniquely like so:
$ ppl post bob <unique-identifier> --country Afghanistan
For phone numbers and email addresses, the data is its own unique identifier, and that seems to work just fine. Postal addresses are composed of several pieces of data, so that approach doesn't work for them.
The vCard format's ADR property does support a TYPE parameter, but I'm wary of misappropriating it as a unique identifier. In RFC2426, the example usage of TYPE suggests more of a "list of tags" usage than anything else:
ADR;TYPE=dom,home,postal,parcel:;;123 Main Street;Any Town;CA;91921-1234
Another option would be ordering the addresses lexicographically and giving each one a number based on its position in that list.
$ ppl post bob
1. 3701 Southwest 12th Street, Topeka, Kansas, USA
2. 350 5th Avenue, New York City, New York, USA, 10118
$ ppl post bob --delete 2
$ ppl post bob
1. 3701 Southwest 12th Street, Topeka, Kansas, USA
But this has the potential to create quite a confusing user experience. For example, consider what would have happened in the above example if the user instead ran ppl post bob --delete 1. The address that used to be 2 would now be 1, and unless they re-ran the ppl post bob command this would not be clear. The confusion would increase exponentially the more postal addresses the contact had.
Despite the above concerns, that number-based unique identifier is the best I've been able to come up with so far.
The text was updated successfully, but these errors were encountered:
I'm liking the idea of having numeric identifiers for more than just addresses. I've gone through and updated my contacts' phone numbers a couple times recently. First to set a type, then to specify preferred numbers. Typing out the phone number whenever I want to do anything to it gets old, and I already need to do a ppl phone johnd first so that I can get the phone number.
To set a preferred phone number, right now I need to do this:
I know what you mean, that can be a bit of a pain. Incidentally, I recently spent some time expanding on the bash completion code you contributed, so that it can autocomplete things like this.
$ ppl phone james<tab># pressing tab shows suggested matches
james.jones@work.com jamie@home.com
$ ppl phone james jamie<tab># pressing tab autocompletes the remaining address
$ ppl phone james jamie@home.com
Since doing that, it's been much less frustrating. I'm not sure how this whole thing will turn out just yet, though. On the one hand., I'm extremely dubious of numerical identifiers. In the past I've used CLI todo list software that relied on them, and it was a never-ending usability nightmare remembering all these arbitrary numbers that constantly shifted around when things were created and deleted. I found myself having to re-output the list every other command.
But on the other hand, I plan to build them into ppl post anyway, and I'll try to keep my mind open when I do. Once they're built into that command, I am intrigued to see how I feel about numerical identifiers. If nothing else it'll be an interesting challenge trying to make them work better than my previous experiences with them, and if it works out well enough, who knows.
The lack of this functionality is occasionally annoying. ppl post ought to work like email and phone somehow, so that contacts can have more than one postal address each.
The only thing standing in the way of this right now is my uncertainty regarding unique identifiers for postal addresses. In order to store multiple addresses, there needs to be a way to identify each address uniquely like so:
For phone numbers and email addresses, the data is its own unique identifier, and that seems to work just fine. Postal addresses are composed of several pieces of data, so that approach doesn't work for them.
The vCard format's
ADR
property does support aTYPE
parameter, but I'm wary of misappropriating it as a unique identifier. In RFC2426, the example usage ofTYPE
suggests more of a "list of tags" usage than anything else:Another option would be ordering the addresses lexicographically and giving each one a number based on its position in that list.
But this has the potential to create quite a confusing user experience. For example, consider what would have happened in the above example if the user instead ran
ppl post bob --delete 1
. The address that used to be2
would now be1
, and unless they re-ran theppl post bob
command this would not be clear. The confusion would increase exponentially the more postal addresses the contact had.Despite the above concerns, that number-based unique identifier is the best I've been able to come up with so far.
The text was updated successfully, but these errors were encountered: