It is impossible to have an alias called "cd..." where ... is anything or nothing. If you create an alias with a name such as I did, "cdate" then this function will be inaccessible. There is no issue if "cd" are not the first two characters, only if they are.
I am sure that there is a reason for this obscure bug, but without the source I doubt I shall ever know. Please fix this as soon as possible; it is breaking scripts.
Strange..
alias cdate {
if (!$isid) echo -a ok
else return ok
}
/cdate works but $cdate doesn't
alias cdx {
if (!$isid) echo -a ok
else return ok
}
/cdx works but $cdx doesn't
It's not really a bug, see
this.
Well qwerty you comment that it is now more consistent but I find the whole concept of the string append shorthand nothing if not inconsistent in the first place since it only applies to a select few identifiers. I was already aware of the shorhand and all the identifiers relating to it, except for $cd because I never use file servers.
Perhaps then, this is more of a feature request than a bug report but whether or not it breaks some scritps I personally feel that this needs to be standardised so that if you want to append strings to directory identifiers then you should be required to use the $+() or $+ identifiers just as in any other scenario. After all, with the way that it is now, some scripts are already broken and I cannot think of a more suitable name for my alias than cdate, given what it does and nor do I wish to have to based on some obscure an inconsistent shortcut for fileservers.
I agree that making all identifiers unable to be prepended directly to a string would be more consistent, but changing this now would break far too many scripts; I've seen countless scripts using $mircdirsomething, for example. The drawbacks of implementing this right now are greater than the advantages imo.
KT's suggestion in that other thread sounds good to me.
That creates another problem in that a script could use $cdtemp meant as $cd $+ temp and then another script could define $cdtemp or /cdtemp as a command and break it.
qwerty, yes it would of course break some scripts, but it is not exactly that difficult to fix. You could even write a script to batch fix it if you really wanted to. I think it's more important to have this sorted out once and for all than to have it hanging on for ever more, continuing to cause all kinds of problems.