Re: ca - New bash command proposal

2009-02-13 Thread Chet Ramey
Rolf Brudeseth wrote: > Andreas Schwab wrote: >> >> >> ca() { (cd "$@" && pwd -P); } >> >> Andreas. >> >> > That works if I want the path to a directory, but it does not let me > operate on files within the directory. Once you have the pathname to a directory, you have dozens of tools available

Re: ca - New bash command proposal

2009-02-12 Thread Rolf Brudeseth
Andreas Schwab wrote: ca() { (cd "$@" && pwd -P); } Andreas. That works if I want the path to a directory, but it does not let me operate on files within the directory. I would also like to do this: ro...@otto:~/test/B/BB$ ca ../b|xargs cat hello Rolf

Re: ca - New bash command proposal

2009-02-12 Thread Rolf Brudeseth
Mike Frysinger wrote: On Thursday 12 February 2009 04:58:09 Andreas Schwab wrote: Mike Frysinger writes: On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote: I would like to propose a new command for bash: ca [path] It returns the canonical path based on the current w

Re: ca - New bash command proposal

2009-02-12 Thread Rolf Brudeseth
Andreas Schwab wrote: ca() { (cd "$@" && pwd -P); } Andreas. That works if I want the path to a directory, but it does not let me operate on files within the directory. I would also like to do this: ro...@otto:~/test/B/BB$ ca ../b|xargs cat hello Rolf

Re: ca - New bash command proposal

2009-02-12 Thread Rolf Brudeseth
Mike Frysinger wrote: On Thursday 12 February 2009 04:58:09 Andreas Schwab wrote: Mike Frysinger writes: On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote: I would like to propose a new command for bash: ca [path] It returns the canonical path based on the current w

Re: ca - New bash command proposal

2009-02-12 Thread Rolf Brudeseth
Andreas Schwab wrote:Andreas Schwab wrote: ca() { (cd "$@" && pwd -P); } Andreas. That works if I want the path to a directory, but it does not let me operate on files within the directory. I would also like to do this: ro...@otto:~/test/B/BB$ ca ../b|xargs cat hello Rolf

Re: ca - New bash command proposal

2009-02-12 Thread Rolf Brudeseth
Mike Frysinger wrote: On Thursday 12 February 2009 04:58:09 Andreas Schwab wrote: Mike Frysinger writes: On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote: I would like to propose a new command for bash: ca [path] It returns the canonical path based on the current work

Re: ca - New bash command proposal

2009-02-12 Thread Andreas Schwab
Mike Frysinger writes: > On Thursday 12 February 2009 04:58:09 Andreas Schwab wrote: >> Mike Frysinger writes: >> > On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote: >> >> I would like to propose a new command for bash: >> >> >> >> ca [path] >> >> >> >> It returns the canonical path b

Re: ca - New bash command proposal

2009-02-12 Thread Mike Frysinger
On Thursday 12 February 2009 04:58:09 Andreas Schwab wrote: > Mike Frysinger writes: > > On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote: > >> I would like to propose a new command for bash: > >> > >> ca [path] > >> > >> It returns the canonical path based on the current working direct

Re: ca - New bash command proposal

2009-02-12 Thread Andreas Schwab
Mike Frysinger writes: > On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote: >> I would like to propose a new command for bash: >> >> ca [path] >> >> It returns the canonical path based on the current working directory and >> entered path. >> >> >> If the current working directory has be

Re: ca - New bash command proposal

2009-02-11 Thread Mike Frysinger
On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote: > I would like to propose a new command for bash: > > ca [path] > > It returns the canonical path based on the current working directory and > entered path. > > > If the current working directory has been traversed through a symbolic > li

ca - New bash command proposal

2009-02-11 Thread Rolf Brudeseth
I would like to propose a new command for bash: ca [path] It returns the canonical path based on the current working directory and entered path. If the current working directory has been traversed through a symbolic link, then listing a higher level path using dotdot's do not always show I