- Notifications
You must be signed in to change notification settings - Fork2
Search bookmarks in SourceTree and open with code editor / SourceTree / finder via Alfred.
License
oe/sourcetree-alfred-workflow
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Search bookmarks in SourceTree and launch them via Alfred.
Credits: This is a swift clone ofAlfred_SourceTree byyourtion. Due to the latest release of macOS 12.3, python2 has been removed, which broke the original workflow. So I reimplemented this workflow in Swift. It should be much more stable and faster.
- support fuzzy search
- can open repo in your code editor directly by presscmd +enter, using VS Code by default, you cancustom it
- can reveal repo in find by pressoption +enter
- you must haveSourceTree installed
- you should have unlockedPowerpack in Alfred
- make sure you have
swiftavailable in terminal.(If you haveXcodeinstalled, you can skip this step.):- type
swift --versionin terminal, if you don't see any version info output, following next step to install it. - type
xcode-select --installin terminal to install swift cli tools
- type
download workflow then click the downloaded file to install
Promotion: usingsourcetree-custom-actions to add useful actions for SourceTree
launch alfred then inputst andkeyword separated with a space to search bookmarks, press enter to launch the bookmark in SourceTree.
Additionally:
select a bookmark, press
cmd+enterto open the repo in your favorite code editor, seehow to custom code editorselect a bookmark, pressoption+enterto reveal the repo in Finder
If you are using an old Intel Chip Mac, you may experience the unbearable lagging, that's because of Swift JIT Compiler is pretty slow on Intel Chip.
You can follow the following steps to compile the workflow script to binary to speed up its response speed.
enter
st $compilein Alfred then pressenterkey
If you are using Apple Silicon Macs(like M1, M1 Pro), you can also compile the workflow for better performance
Open Alfred Preferences panel
find and click the
SourceTreeinWorkflows listclick
Configure Workflow...button bellow the workflow namechange the value of
Code Editor Config, , multiple values can be set depending on the file extensions in the folder.Example:
# configuration format:# [editor cli name]=[extension1, extension2,...]# extension case does not matter# example, using Xcode for XCode projectsxed=.xcodeproj,.xcworkspace,package.swift# using vscode for defaultcode=*
The order of the list is important, the first one that matches will be used.
Here are some common editors' cli names:
codefor VSCode (default)xedfor Xcodesublfor Sublime Textwebstormfor WebStormideafor IntelliJ IDEA
Tips:
- If your preferred editor not available in CLI, make sure you've append it's binary file's directory to the
PATH - You may need to authorize Alfred to access the folders containing the repos., seehere
click
savebutton to save variable settingsclick the bug 🐞 icon in the top right to show the debug log
try yourself, if it works, congratulations; if not, check the debug log, make sure the cli name is existing and correct, and
PATHcontains your cli
I'm new to swift, feel free to make a pull request if you are willing to improve the code quality or its functions.
About
Search bookmarks in SourceTree and open with code editor / SourceTree / finder via Alfred.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
