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
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
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
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
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
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
if (_path_isdir (result) == 0)
+ if (flags & PATH_NOTDIRONLY)
+path_found = _path_ispath (result);
+ else
+path_found = _path_isdir (result);
+ if (!path_found)
{
if ((flags & PATH_NOALLOC) == 0)
free (result);
Rolf Brudeseth