{"id":15136028,"url":"https://github.com/dandavison/iterm2-dwim","last_synced_at":"2025-10-16T08:51:50.857Z","repository":{"id":62571906,"uuid":"100485741","full_name":"dandavison/iterm2-dwim","owner":"dandavison","description":"iTerm2 click handler","archived":false,"fork":false,"pushed_at":"2020-06-07T01:39:20.000Z","size":54,"stargazers_count":22,"open_issues_count":4,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-28T07:11:14.650Z","etag":null,"topics":["debug","development-environment","emacs","error-messages","iterm2","pycharm","sublime"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dandavison.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-16T12:15:02.000Z","updated_at":"2022-08-23T15:27:43.000Z","dependencies_parsed_at":"2022-11-03T16:31:56.348Z","dependency_job_id":null,"html_url":"https://github.com/dandavison/iterm2-dwim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dandavison/iterm2-dwim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandavison%2Fiterm2-dwim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandavison%2Fiterm2-dwim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandavison%2Fiterm2-dwim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandavison%2Fiterm2-dwim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dandavison","download_url":"https://codeload.github.com/dandavison/iterm2-dwim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandavison%2Fiterm2-dwim/sbom","scorecard":{"id":318646,"data":{"date":"2025-08-11","repo":{"name":"github.com/dandavison/iterm2-dwim","commit":"7870b548c610b4b4d75ce705e020f53f1d75e429"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 2/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T00:52:57.699Z","repository_id":62571906,"created_at":"2025-08-18T00:52:57.699Z","updated_at":"2025-08-18T00:52:57.699Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279170791,"owners_count":26118639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debug","development-environment","emacs","error-messages","iterm2","pycharm","sublime"],"created_at":"2024-09-26T06:03:45.925Z","updated_at":"2025-10-16T08:51:50.819Z","avatar_url":"https://github.com/dandavison.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"``iterm2-dwim`` is a click handler for iTerm2. The aim is that you\ncommand-click on any file path, relative or absolute, and it opens the\nfile in your editor. If there was a line number, your editor goes to\nthat line. So, compiler/linter output, tracebacks, git output, etc.\n\nCurrently Emacs, PyCharm, VS Code and Sublime are supported. To choose which\neditor to use, see ``settings.py``.\n\nThe following path-like patterns are supported. For the ones with line\nnumbers, the file will be opened at that line.\n\n+---------------------------------------------------------------+--------------------------------+----------+\n| Pattern                                                       | Type                           | Status   |\n+===============================================================+================================+==========+\n| ``/absolute/path/to/file``                                    | Absolute path                  | ✅       |\n+---------------------------------------------------------------+--------------------------------+----------+\n| ``relative/path/to/file``                                     | Relative path                  | ✅       |\n+---------------------------------------------------------------+--------------------------------+----------+\n| ``relative/path/to/file:336:1:``                              | Compiler / Linter etc output   | ✅       |\n+---------------------------------------------------------------+--------------------------------+----------+\n| ``a/relative/path/to/file``                                   | In git diff output             | ✅       |\n+---------------------------------------------------------------+--------------------------------+----------+\n| ``\"/absolute/path/to/file.py\", line 336, in some_function``   | Python stack traces            | ✅       |\n+---------------------------------------------------------------+--------------------------------+----------+\n| ``\u003e /path/to/file.py(336)some_function()``                    | Python ipdb output             | ✅       |\n+---------------------------------------------------------------+--------------------------------+----------+\n\nInstallation\n~~~~~~~~~~~~\n\n1. Clone this repo and run ``python setup.py develop``.\n\n2. In ``settings.py``, set the absolute path to the command-line utility\n   that opens files in youe text editor / IDE. For PyCharm this is\n   called ``charm``, for Sublime this is called ``subl`` and for Emacs\n   this is called ``emacsclient``.\n\n3. Find the absolute path to the ``iterm2-dwim`` executable, by running\n   the command ``which iterm2-dwim``. For example, on my system, this is\n   ``/usr/local/bin/iterm2-dwim``.\n\n4. Open iTerm2 settings, click on \"Profiles\", select your profile, click\n   on the \"Advanced\" tab for that profile, and do two things:\n\n5. In the \"Smart Selection\" section, click \"Edit\", click \"+\" to add a new rule, and enter the\n   following values in the 3 rule fields:\n\n   - Notes: ``Compiler/Linter output``\n   - Regular Expression: ``(\\~?/?([[:letter:][:number:]._-]+/+)+[[:letter:][:number:]._-]+/?)(:.+)``\n   - Precision: ``Very High``\n\n   Now click \"Edit Actions\", click \"+\" to add an action, choose \"Run\n   Command\" and enter ``/absolute/path/to/iterm2-dwim \\1 \\3`` as the\n   \"Parameter\".\n\n6. In the \"Semantic History\" section, choose \"Run command\" and enter\n   ``/absolute/path/to/iterm2-dwim \\1 \\4``.\n\n7. Make sure you didn't literally enter ``/absolute/path/to/`` anywhere!\n   The path should be the path from step (3), given by ``which iterm2-dwim``.\n\n8. (Optional, but relative paths won't be resolved without it):\n   configure your shell prompt so that the current directory is written\n   to a file named ``/tmp/cwd`` every time the prompt is displayed. For\n   example, put this line in your ``~/.bashrc``:\n\n   .. code:: sh\n\n       export PROMPT_COMMAND='echo $PWD \u003e /tmp/cwd'\n\n9. ⌘-click on things!\n\nYour iTerm2 settings should look something like this:\n\nOptional configuration\n^^^^^^^^^^^^^^^^^^^^^^\n\n1. To get error message alerts, run ``brew install terminal-notifier``\n   and check it's working with ``terminal-notifier -message hello``.\n\n**For Emacs users:**\n\n1. Make sure that you are starting the emacs server\nin your emacs config file:\n\n   .. code:: emacs-lisp\n\n       (require 'server)\n       (unless (server-running-p) (server-start))\n\nDebugging\n~~~~~~~~~\n\nThis is under development and you will encounter problems initially.\nProbably, you'll command click on something and nothing will happen.\n\nYou can't use ``ipdb`` to debug it: the python process is started by\niTerm2 and is not attached to your terminal's standard input/output.\nSimilarly, note that the python process inherits its environment from\nthe iTerm2 process and thus does not have access to environment\nmodifications made in your shell config file.\n\nIt writes a log: run ``tail -f /tmp/iterm2-dwim.log``.\n\nIf nothing happens and nothing is written to the log, another trick is\njust to run it from the command line and see the traceback:\n\n::\n\n    $ iterm2-dwim /some/file.py 'the text that comes after the file path'\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdandavison%2Fiterm2-dwim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdandavison%2Fiterm2-dwim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdandavison%2Fiterm2-dwim/lists"}