Axel Liljencrantz wrote:


2009/2/6 Josic Goran <[email protected]>
James Vega
Fri, 06 Feb 2009 06:17:10 -0800

On Fri, Feb 06, 2009 at 11:14:09AM +0100, Goran Josic wrote:
> As I don't have any proj directory in the ~/foo/subdir I would expect
> the same behavior cd had.
>
> Is this a bug or a missing feature...or developer's choice?

It's a feature of cd completion for relative paths.  From the "Special
Variables" section of the "Environment Variables" part of the
documentation[0]:

 CDPATH, which is an array of directories in which to search for the
 new directory for the cd builtin. The fish init files defined CDPATH
 to be a universal variable with the values . and ~.

[0] - http://fishshell.org/user_doc/index.html#variables

--------------------------------------------------------------------------------------------

Thank you for the answer James. I know that.

I known CDPATH from bash...that's not the point

I was just wondering why there isn't the same functionality for ls.

I know that for the other commands can be dangerous.

I don't expect the same functionality for mv and rm ... but for ls it can be very useful.

Maybe I'm wrong...but I would expected to have the same behavior for ls.

That's why I was wondering if this is a dev's choice or bug or just a missing feature.

I hope I have explained better now.

Never though of it, but I agree that it does make sense that non-destructive commands like ls try to be a bit more forgiving and 'do what you mean'. Unfortunatly, that's not the choice of the shell. 'cd' is a builtin ish command, so we can make it behave any way we please. 'ls' is, and should be, an external command. It would be possible in theory to recognize that ls is a non-destructive command and remorph path names under without telling anybody, but before you know it, you'll end up with some very, very confusing corner cases.

Axel
 



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users


Ok...understand. Thank you for explaining this.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to