On Tue, Oct 6, 2009 at 02:41, Philip Ganchev <[email protected]> wrote:
> pwd is a function with definition
> function pwd --description 'Print working directory'
>        echo $PWD | sed -e "s|^$HOME|~|"
>
> end
>
So you can also just use $PWD instead of (pwd).

I slightly hate the mental shift because each shell has its own
$cwd/$PWD semantics but pwd works with all shells, so I've got used to
always using pwd.

Also, considering fish's "one obvisous way to do it, obvious being an
external command if possible":
- why do we need $PWD if there is /bin/pwd?
- why do we need a pwd function to replace /bin/pwd?
  Displaying "~" is nice, but as Ken discovered it's sometimes harmful.
  And commands that behave differently between shells are annoying.

-- 
Beni <[email protected]>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to