{ "info": { "author": "Dan Davison", "author_email": "dandavison7@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "``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, etc.\n\nCurrently Emacs, PyCharm 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 | \u2705 |\n+---------------------------------------------------------------+--------------------------------+----------+\n| ``relative/path/to/file`` | Relative path | \u2705 |\n+---------------------------------------------------------------+--------------------------------+----------+\n| ``relative/path/to/file:336:1:`` | Compiler / Linter etc output | \u274c |\n+---------------------------------------------------------------+--------------------------------+----------+\n| ``a/relative/path/to/file`` | In git diff output | \u2705 |\n+---------------------------------------------------------------+--------------------------------+----------+\n| ``\"/absolute/path/to/file.py\", line 336, in some_function`` | Python stack traces | \u2705 |\n+---------------------------------------------------------------+--------------------------------+----------+\n| ``> /path/to/file.py(336)some_function()`` | Python ipdb output | \u2705 |\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 (see\n screenshots below):\n5. In the \"Smart Selection\" section, click \"Edit\", select the \"Paths\"\n rule, click \"Edit Actions\", click \"+\" to add an action, choose \"Run\n Command\" and enter ``/absolute/path/to/iterm2-dwim \\0`` as the\n \"Parameter\".\n6. In the \"Semantic History\" section, choose \"Run command\" and enter\n ``/absolute/path/to/iterm2-dwim \\1 \\4``.\n7. Make sure you didn't literally enter ``/absolute/path/to/`` -- the\n path should be the path from step (5), given by\n ``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 > /tmp/cwd'\n\n9. \u2318-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:** 1. Make sure that you are starting the emacs server\nin your emacs config file:\n``elisp (require 'server) (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 'any text can go here'", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dandavison/iterm2-dwim", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "iterm2-dwim", "package_url": "https://pypi.org/project/iterm2-dwim/", "platform": "", "project_url": "https://pypi.org/project/iterm2-dwim/", "project_urls": { "Homepage": "https://github.com/dandavison/iterm2-dwim" }, "release_url": "https://pypi.org/project/iterm2-dwim/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "iTerm2 click handler", "version": "0.0.3" }, "last_serial": 3197673, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "749a55b6ef2d518afae39092a63bcc5c", "sha256": "fd7f1674024e0940843565bf3d845b41db8ac01df8256e9726c724ea37841f77" }, "downloads": -1, "filename": "iterm2-dwim-0.0.0.tar.gz", "has_sig": false, "md5_digest": "749a55b6ef2d518afae39092a63bcc5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1829, "upload_time": "2017-08-16T12:09:59", "url": "https://files.pythonhosted.org/packages/0a/91/6bb4ec0cad67b65c6872e40b35827caf2152c935e68b4aa3baa37c3a4cae/iterm2-dwim-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "67997c829b46d7f5013c91c6f0456cce", "sha256": "fea208b899f80befa0eaec218a9e7a866170188508b735e7d9de2ebab79f4859" }, "downloads": -1, "filename": "iterm2-dwim-0.0.1.tar.gz", "has_sig": false, "md5_digest": "67997c829b46d7f5013c91c6f0456cce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5504, "upload_time": "2017-09-23T20:38:45", "url": "https://files.pythonhosted.org/packages/5d/67/8fdbf871b16a897ea489e129ad2b079becf7cafff5123db9d872d074cf0b/iterm2-dwim-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c7f67b8e364bd07ca454870280ab49fe", "sha256": "df39100b5ea5ccba5d5b2b09d89461bb8e09fa4fc7cf415504d072838229caf2" }, "downloads": -1, "filename": "iterm2-dwim-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c7f67b8e364bd07ca454870280ab49fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6169, "upload_time": "2017-09-23T20:45:09", "url": "https://files.pythonhosted.org/packages/3f/9b/0cbd050d661a481e72da5b0cb6c9777cae1d5eabcdaf1c23c9c4ec5ce85e/iterm2-dwim-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "046a83beda239b0cd5bc60c16337a4a0", "sha256": "a608c8e3e11c60e089b76aadda9db5354e19049fefc0aa7ab094c95736a62f36" }, "downloads": -1, "filename": "iterm2-dwim-0.0.3.tar.gz", "has_sig": false, "md5_digest": "046a83beda239b0cd5bc60c16337a4a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6162, "upload_time": "2017-09-23T20:53:08", "url": "https://files.pythonhosted.org/packages/80/29/cdafd34d58e835cc9c8a606ce0840a5e59a4a4fb595baea8b58bfb13d5b9/iterm2-dwim-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "046a83beda239b0cd5bc60c16337a4a0", "sha256": "a608c8e3e11c60e089b76aadda9db5354e19049fefc0aa7ab094c95736a62f36" }, "downloads": -1, "filename": "iterm2-dwim-0.0.3.tar.gz", "has_sig": false, "md5_digest": "046a83beda239b0cd5bc60c16337a4a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6162, "upload_time": "2017-09-23T20:53:08", "url": "https://files.pythonhosted.org/packages/80/29/cdafd34d58e835cc9c8a606ce0840a5e59a4a4fb595baea8b58bfb13d5b9/iterm2-dwim-0.0.3.tar.gz" } ] }