From 3b21f8692caff441cb3bf119348a00fe4f1ac3a2 Mon Sep 17 00:00:00 2001 From: Royce Remulla Date: Wed, 3 Jan 2024 22:16:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89=20feat:=20Handler=20to=20reverse?= =?UTF-8?q?=20the=20convertPathToTilde?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/file.applescript | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/file.applescript b/core/file.applescript index b46001a..8a3248e 100644 --- a/core/file.applescript +++ b/core/file.applescript @@ -11,7 +11,7 @@ @Change Log: July 26, 2023 4:11 PM - Add replaceText handler. - @Last Modified: 2023-11-21 18:46:48 + @Last Modified: 2024-01-02 12:21:42 *) use script "core/Text Utilities" @@ -259,6 +259,11 @@ on convertPathToTilde(filePath) end convertPathToTilde +on expandTildePath(tildePath) + textUtil's replace(tildePath, "~", "/Users/" & std's getUsername()) +end expandTildePath + + on containsText(filePath, substring) try set shellCommand to "grep " & quoted form of substring & " " & quoteFilePath(filePath)