Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持 warp #64

Open
atian25 opened this issue May 12, 2024 · 1 comment
Open

支持 warp #64

atian25 opened this issue May 12, 2024 · 1 comment

Comments

@atian25
Copy link
Collaborator

atian25 commented May 12, 2024

判断运行环境或者提供配置,在 warp/iterm2 执行添加完项目后,直接在当前终端切换到对应目录,而不是强制 iterm2

@atian25
Copy link
Collaborator Author

atian25 commented May 12, 2024

✨✨ Here's an AI-assisted sketch of how you might approach this issue saved by @atian25 using Copilot Workspace v0.17

Topic

Does the terminal automatically switch to the corresponding directory after adding a project in warp/iterm2 environments?

Before
  • Terminal does not automatically switch to the corresponding directory after adding a project in warp/iterm2 environments.
  • The terminal change directory feature is only supported on Darwin platforms as indicated in lib/command/add.js and lib/command/find.js.
  • The script for changing directories is generated specifically for iTerm and Terminal applications on macOS, as seen in lib/utils.js.
  • There is no mention or support for warp/iterm2 environments in the current implementation.
After
  • Terminal now automatically switches to the corresponding directory after adding a project in warp/iterm2 environments.
  • Terminal change directory feature is extended to support warp/iterm2 environments alongside Darwin platforms.
  • Scripts for changing directories are updated to include support for warp/iterm2 environments in addition to iTerm and Terminal applications on macOS.
Plan
  • lib/utils.js (CHANGE)
    • Add a new function generateWarpScript to generate a script for changing directories in warp/iterm2 environments.
    • Update generateAppleScript to include a condition that checks for warp/iterm2 environments and calls generateWarpScript if true.
  • lib/command/add.js (CHANGE)
    • Modify the _run method to include a check for warp/iterm2 environments and execute the corresponding script for directory change.
  • lib/command/find.js (CHANGE)
    • Modify the _run method to include a check for warp/iterm2 environments and execute the corresponding script for directory change.
Sketch of implementation

View the changes

Details

Code analyzed at b2ef85c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant