Re: Unix file path problems
Re: Unix file path problems
- Subject: Re: Unix file path problems
- From: Bill <email@hidden>
- Date: Mon, 28 Jun 2004 09:53:59 +0800
On Mon, 28 Jun 2004 00:15:34 +0100, Martin Orpen
<email@hidden> wrote:
>
> I've got a script that I use to open the Terminal in the directory
that I'm
> browsing in the Finder:
>
> tell application "Finder"
> set myFolder to (target of front window) as string
> set pPath to quoted form of POSIX path of myFolder
> end tell
> tell application "Terminal"
> activate
> do script "cd " & pPath
> end tell
>
> This works fine until you encounter unusual characters in the folder
name,
> like "" (option-f).
>
> Is there a way of getting these characters interpreted correctly in a
POSIX
> path?
Martin,
Would you try:
tell application "Finder"
set myFolder to (target of front window) as Unicode text
set pPath to quoted form of POSIX path of myFolder
end tell
tell application "Terminal"
activate
do script "cd " & pPath
end tell
My Terminal is set to use UTF-8 for character set encoding; and
there's a file named ".inputrc" in ~/
The content of .inputrc is (with unix line ending):
set meta-flag on
set convert-meta off
set output-meta on
You need to restart Terminal, in order to take effect.
Regards
bill
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.