Skip to content

Commit

Permalink
πŸŽ‰ feat: Handler to reverse the convertPathToTilde
Browse files Browse the repository at this point in the history
  • Loading branch information
roycetech committed Jan 3, 2024
1 parent 26a7c19 commit 3b21f86
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/file.applescript
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3b21f86

Please sign in to comment.