darcs

Issue 2350 darcs cha shorthand no longer works

Title darcs cha shorthand no longer works
Priority Status given-up
Milestone Resolved in
Superseder Nosy List owst
Assigned To
Topics

Created on 2013-12-05.20:41:27 by owst, last changed 2017-07-31.01:17:43 by gh.

Messages
msg17106 (view) Author: owst Date: 2013-12-05.20:41:26
I always say `darcs cha`, rather than the longhand `darcs changes`. 
darcs built from HEAD complains that there's no such command cha. 

In HEAD, "changes" is now an alias, and so I suppose that the alias
isn't being
treated in the same way as a normal command. I'm not sure if that's on
purpose
or not, but I would suggest that the alias should be treated in the same way
w.r.t. shorthands (i.e. unique shorthands should identify either commands or
aliases, with a complaint about any non-uniqueness).
msg17107 (view) Author: kowey Date: 2013-12-05.21:51:43
It's on purpose that aliases do not get fed into the abbreviations system (the idea being that aliases would cause lots of unwanted clashes/ambiguities; I could have been wrong in my design though)

It sounds like we didn't account for the aliases that arise from command renaming.  I think there ought to be a way to grandfather some aliases into the disambiguation system
 

On 5 December 2013 at 20:41:47, Owen Stephens (bugs@darcs.net) wrote:
>
>
>New submission from Owen Stephens :
>
>I always say `darcs cha`, rather than the longhand `darcs changes`.
>darcs built from HEAD complains that there's no such command cha.
>
>In HEAD, "changes" is now an alias, and so I suppose that the alias
>isn't being
>treated in the same way as a normal command. I'm not sure if that's on
>purpose
>or not, but I would suggest that the alias should be treated in the same way
>w.r.t. shorthands (i.e. unique shorthands should identify either commands or
>aliases, with a complaint about any non-uniqueness).
>
>----------
>messages: 17106
>nosy: owst
>status: unknown
>title: darcs cha shorthand no longer works
>
>__________________________________
>Darcs bug tracker  
>
>__________________________________
>_______________________________________________
>darcs-devel mailing list
>darcs-devel@darcs.net
>http://lists.osuosl.org/mailman/listinfo/darcs-devel
>

-- 
http://erickow.com
msg17264 (view) Author: gh Date: 2014-04-04.19:07:58
To me it is okay that it is on purpose; changing a command name is
painful but if we decide to do it, we need to embrace this change
somehow. The documentation for version 2.10 will reflect it.
msg17265 (view) Author: bf Date: 2014-04-04.21:26:53
BTW this also concerns the automatic completion for shells: these use
darcs --commands (at least the one for zsh does) and hidden commands are
not listed.

Maybe allow user to define their own aliases?

> cat ~/.darcs/alias
amend-unrecord amend-record --unrecord
unpull obliterate

We could even go so far as removing the hard-coded aliases from the sources.

Variation: extend the defaults file syntax with an 'alias' keyword. For
consistency, add keyword 'default', too (but it can be left out for
compatibility):

> cat ~/.darcs/defaults
alias changes log
default record prompt-long-comment
msg17279 (view) Author: gh Date: 2014-04-07.18:39:38
The alias idea deserves its own separate ticket :-)
History
Date User Action Args
2013-12-05 20:41:27owstcreate
2013-12-05 21:51:45koweysetmessages: + msg17107
2014-04-04 19:07:59ghsetmessages: + msg17264
2014-04-04 21:26:54bfsetmessages: + msg17265
2014-04-07 18:39:39ghsetmessages: + msg17279
2017-07-31 01:17:43ghsetstatus: unknown -> given-up