Skip to content

Conversation

ChiahongHong
Copy link
Contributor

This pull request refactors the method for opening the terminal on macOS by removing the use of temporary AppleScript files. The previous implementation involved generating, executing, and then deleting a temporary AppleScript file. This has been replaced with a more efficient and cleaner approach using the open -a {terminal} "{dir}" command to directly launch the desired terminal and open the target directory.

  • Using Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) instead of ~ because there is no tilde expansion
  • Using \"{dir}\", so the line dir = dir.Replace(" ", "\\ "); is removed.

@love-linger love-linger self-assigned this Sep 10, 2024
@love-linger love-linger added the enhancement New feature or request label Sep 10, 2024
@love-linger love-linger merged commit 28f83e1 into sourcegit-scm:develop Sep 10, 2024
13 checks passed
love-linger added a commit that referenced this pull request Sep 10, 2024
* remove Visual Studio ENC0004 warning
@ChiahongHong ChiahongHong deleted the mac-terminal branch September 10, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants