henrycatalinismith / ppl

The command line address book
http://henry.catalinismith.com/ppl/
Other
300 stars 18 forks source link

Shorter "ppl show" (feature request) #3

Closed javierarce closed 11 years ago

javierarce commented 11 years ago

It would be nice that ppl fred was equivalent to ppl show fred

henrycatalinismith commented 11 years ago

I appreciate the suggestion, and I've been considering it again today as a result. I thought about this myself a few times earlier in the project, so I'm not surprised to see somebody else have the same idea.

Ultimately, I repeatedly decided against doing this for a couple of reasons. Here they are, but please don't feel like I'm throwing these at you to belittle your suggestion: they're reasons I had to come up with to convince myself to stop spending so much time debating this idea a few weeks ago.

  1. Potential name collisions between contact IDs and commands. Certainly there probably aren't many people out there who would refer to their friend as "phone", but I don't want to get in anybody's way by creating a bunch of reserved words.
  2. I'm trying to structure the overall "user experience" in a similar way to git's CLI by following the pattern of {{subject}} {{verb}} {{object}}. Creating a special case where that pattern doesn't apply would mean that the UX isn't consistent with either git or with the other commands in ppl itself.

I agree that typing ppl show gets boring after a while though. Perhaps the solution is for me to get on with implementing alias support? That way you could put something like the following in your ~/.pplconfig:

[alias]
    s = show

Then it would just be ppl s fred which feels a little bit less tedious to type.

javierarce commented 11 years ago

Understood, thanks for your answer, Henry!