git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How can I get full filenames from Git difftool (for Microsoft Word “Compare Documents” feature)?

From
Jeff Epler <jepler@unpythonic.net>
Date
Dec 14, 2009, 13:11 UTC
Message-ID
<20091214131112.GC22735@unpythonic.net>
In-Reply-To
<b507cb050912132225j1bdc39c2v42a3bf6bddf1cb1a@mail.gmail.com>
In the bash shell, you can convert a relative path to absolute by prepending
the directory name:
    mkabs () {
        case "$1" in
        /*) echo "$1" ;;
        *)  echo "$(pwd)/$1" ;;
        esac
    }
Using it at the shell prompt:
    $ mkabs example
    /home/jepler/example
    $ ls -l $(mkabs example)
    -rw-r--r-- 1 jepler jepler 0 2009-12-14 07:08 /home/jepler/example
If mac has a gnu-like readlink(1), then use 'readlink -f' instead of the
mkabs shell function:
    $ readlink -f example
    /home/jepler/example

You should be able to write a shell script which does the conversion from relative to absolute using one of these patterns, and then invokes the applescript.

It may turn out that there's a way to convert a path from relative to absolute in applescript as well, but I wouldn't know it.

Jeff
Previous: Matthieu Moy
Message 3 of 3 in “How can I get full filenames from Git difftool (for Microsoft Word “Compare Documents” feature)?”
  1. Doug IretonDec 14, 2009
  2. Matthieu MoyDec 14, 2009
  3. Jeff EplerDec 14, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.