{ "info": { "author": "Takafumi Arakaki", "author_email": "aka.tkf@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Unix Shell", "Topic :: System :: Logging", "Topic :: System :: Shells" ], "description": "=============================\n Rash Advances Shell History\n=============================\n\n\n.. sidebar:: Links:\n\n * `Documentation `_ (at Read the Docs)\n\n * `Commands `_\n * `Configuration `_\n * `Tips `_\n\n * `Repository `_ (at GitHub)\n * `Issue tracker `_ (at GitHub)\n * `PyPI `_\n * `Travis CI `_ |build-status|\n\n\nWhat is this?\n=============\n\nShell history is useful. But it can be more useful if it logs more\ndata points. For example, if you forget which `make` target to run\nfor certain project, you'd want to search shell commands that are\nrun in particular directory. Wouldn't it be nice if you can do this?::\n\n rash search --cwd . \"make*\"\n\nRASH records many data points and they are stored in SQLite database.\nHere is a list of recorded information [#]_.\n\n#. Current directory (``$PWD``).\n#. Exit code (``$?``)\n#. Exit code of pipes (``$PIPESTATUS`` / ``$pipestatus``)\n#. The time command is started and terminated.\n#. Environment variable (``$PATH``, ``$SHELL``, ``$TERM``, ``$HOST``, etc.)\n#. Real terminal. ``$TERM`` is used to fake programs.\n RASH can detect if you are in tmux, byobu, screen, gnome-terminal, etc.\n#. Session information. If you go back and forth in some terminals,\n RASH does not loose in which sequence you ran the commands in which\n terminal.\n\n.. [#] If you are curious, checkout ``rash record --help``.\n\n\nRASH also has interactive search interface. You can see the search\nresult as you type. If you are using zsh, you can execute the result\ninstantaneously.\n\n.. image:: https://raw.github.com/tkf/rash/data/rash-isearch.gif\n :alt: RASH interactive search interface\n\n\nInstall\n=======\n\nRASH is written in Python. The easiest way to install is to use `pip`\n(or `easy_install`, if you wish). You may need `sudo` for installing\nit in a system directory.::\n\n pip install rash\n pip install percol # if you want interactive search feature\n\nIf you use virtualenv to install RASH, you may have trouble when\nswitching environment. In that case, it is safe to make an alias\nto full path of the rash executable.::\n\n alias rash=\"PATH/TO/VIRTUALENV/bin/rash\"\n\nIf you want to use developmental version, just clone the git repository\nand add the following in your RC file.::\n\n alias rash=\"PATH/TO/RASH/rash_cli.py\"\n\n\nSetup\n=====\nAdd this to your `.zshrc` or `.bashrc`. That's all.::\n\n eval \"$(rash init)\"\n\nFor more information, see ``rash init --help``.\n\n\nUsage\n=====\n\nSearching history -- ``rash search``\n------------------------------------\n\nAfter your shell history is accumulated by RASH, it's the time to\nmake use of the history! See ``rash search --help`` for detailed\ninformation. Here is some examples.\n\nForget how to run automated test for the current project?::\n\n rash search --cwd . --include-pattern \"*test*\" --include-pattern \"tox*\"\n\nAll git commands you ran in one week.::\n\n rash search --time-after \"1 week ago\" \"git*\"\n\nSome intensive task you ran in the current project that succeeded and\ntook longer than 30 minutes.::\n\n rash search --cwd-under . --include-exit-code 0 --duration-longer-than 30m\n\nWhat did I do after `cd`-ing to some directory?::\n\n rash search --after-context 5 \"cd SOME-DIRECTORY\"\n\nAll failed commands you ran at this directory.::\n\n rash search --cwd . --exclude-exit-code 0\n\nCount number of commands you ran in one day::\n\n rash search --limit -1 --no-unique --time-after \"1 day ago\" | wc -l\n\n\nShowing detailed information -- ``rash show``\n---------------------------------------------\n\nIf you give ``--with-command-id`` to ``rash search`` command, it prints out\nID number for each command history.::\n\n % rash search --with-command-id --limit 5 \"*git*\"\n 359 git log\n 1253 git help clone\n 1677 git help diff\n 1678 git diff --word-diff\n 1780 git merge\n\nYou can see all information associated with a command with\n``rash show`` command::\n\n rash show 1677\n\n\nInteractive search -- ``rash isearch``\n--------------------------------------\n\nSearching history using command line is not fast.\nYou can use ``rash isearch`` command to interactively search\nhistory and see the result immediately as you type.\n\nYou need percol_ to use this feature.\n\nZsh user can setup a keybind like this::\n\n # Type `Ctrl-x r` to start isearch\n bindkey \"^Xr\" rash-zle-isearch\n\nDefining this function in your rc file can be handy and it is\nusable for bash users.::\n\n rash-isearch(){\n eval \"$(rash isearch)\"\n }\n\n.. _percol: https://github.com/mooz/percol\n\n\nDependency\n==========\n\nRASH tested against Python 2.6, 2.7 and 3.2. However, as some\ndependencies are not Python 3 compatible, some functionality is\nmissing when used with Python 3.\n\nPython modules:\n\n* watchdog_ [#nopy3k]_\n* parsedatetime_ [#nopy3k]_\n\n.. _watchdog: http://pypi.python.org/pypi/watchdog/\n.. _parsedatetime: http://pypi.python.org/pypi/parsedatetime/\n\n.. [#nopy3k] These modules do not support Python 3.\n They are not installed in if you use Python 3\n and related functionality is disabled.\n\nPlatforms\n---------\n\nUNIX-like systems\n RASH is tested in Linux and I am using in Linux.\n It should work in other UNIX-like systems like BSD.\n\nMac OS\n I guess it works. Not tested.\n\nMS Windows\n Probably no one wants to use a shell tool in windows, but I\n try to avoid stuff that is platform specific. Only the\n daemon launcher will not work on Windows but there is several\n ways to avoid using it. See ``rash init --help``.\n\nShells\n------\n\nRASH currently supports zsh and bash.\n\n\nDesign principle\n================\n\nRASH's design is focused on sparseness. There are several stages\nof data transformation until you see the search result, and they\nare done by separated processes.\n\nFirst, ``rash record`` command dumps shell history in raw JSON record.\nThis part of program does not touches to DB to make process very fast.\nAs there is no complex transformation in this command, probably in the\nfuture version it is better to rewrite it entirely in shell function.\n\nSecond, ``rash daemon`` runs in background and watches the directory to\nstore JSON record. When JSON record arrives, it insert the data into\ndatabase.\n\n``rash record`` and ``rash daemon`` are setup by simple shell snippet\n``eval $(rash init)``.\n\nFinally, you can search through command history using search interface\nsuch as `rash search`. This search is very fast as you don't read\nall JSON records in separated files.\n\n::\n\n +-------+ +--------+ +--------+ +--------+\n | Shell | | Raw | | SQLite | | Search |\n | hooks |-------->| JSON |-------->| DB |-------->| result |\n +-------+ | record | +--------+ +--------+\n +--------+\n\n `rash record` `rash daemon` `rash search`\n `rash show`\n\n \\------------------------------/ \\------------/\n `rash init` setups them search interface\n\nLicense\n=======\n\nRASH is licensed under GPL v3.\nSee COPYING for details.\n\n\n.. Travis CI build status badge\n.. |build-status|\n image:: https://secure.travis-ci.org/tkf/rash.png?branch=master\n :target: http://travis-ci.org/tkf/rash\n :alt: Build Status", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tkf/rash", "keywords": "history,shell,search", "license": "GNU General Public License v3 (GPLv3)", "maintainer": null, "maintainer_email": null, "name": "rash", "package_url": "https://pypi.org/project/rash/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/rash/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tkf/rash" }, "release_url": "https://pypi.org/project/rash/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "Rash Advances Shell History", "version": "0.1.3" }, "last_serial": 1590284, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "859e6d98bc316256315cd523f941e2ff", "sha256": "f8389cc25903a6712be0b24e19b4fc2a6ed4f5db4ae673596cce45e63ff28d51" }, "downloads": -1, "filename": "rash-0.1.0.tar.gz", "has_sig": false, "md5_digest": "859e6d98bc316256315cd523f941e2ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34057, "upload_time": "2013-02-09T22:06:32", "url": "https://files.pythonhosted.org/packages/a2/53/c8a7f55542242ebd27a21a05768499330ca3f4f5ee378715ed06d7d793d9/rash-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "8c14719b087a3f6533e5591f348af462", "sha256": "776962d06937370b2cb7706b12a2fd24817e71e3fc78ac8d655a4a0004f9e02a" }, "downloads": -1, "filename": "rash-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8c14719b087a3f6533e5591f348af462", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38571, "upload_time": "2013-02-14T17:21:42", "url": "https://files.pythonhosted.org/packages/d3/51/ff9b97436b18f36db6052b48d963930cd1858b3a20f2346ecf8374c6eb4e/rash-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "1d134070119b7eec87d7fb7c83facf7e", "sha256": "69a93c64f91cee25990bd9ff4ac1d7cc2a3f769c95baa37ba2fadf9baddb16db" }, "downloads": -1, "filename": "rash-0.1.2.tar.gz", "has_sig": false, "md5_digest": "1d134070119b7eec87d7fb7c83facf7e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42508, "upload_time": "2013-02-17T01:36:11", "url": "https://files.pythonhosted.org/packages/1d/aa/7ce0d5e7efb25cfa3ef0832a41343bd164b5303c4988d082dd8d1b1647d5/rash-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "cb30ebcfca2b351b04460815a8a331d7", "sha256": "39fdd7b7138de734a533e889dacc9a07bd49d43a0ed9ee913eb1bbd37d2f44fc" }, "downloads": -1, "filename": "rash-0.1.3.tar.gz", "has_sig": false, "md5_digest": "cb30ebcfca2b351b04460815a8a331d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47957, "upload_time": "2015-06-12T21:31:24", "url": "https://files.pythonhosted.org/packages/29/4e/56a727c9bd98f244bc43044b57256c9080c9dd6f1c87df3f7554d40c5930/rash-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cb30ebcfca2b351b04460815a8a331d7", "sha256": "39fdd7b7138de734a533e889dacc9a07bd49d43a0ed9ee913eb1bbd37d2f44fc" }, "downloads": -1, "filename": "rash-0.1.3.tar.gz", "has_sig": false, "md5_digest": "cb30ebcfca2b351b04460815a8a331d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47957, "upload_time": "2015-06-12T21:31:24", "url": "https://files.pythonhosted.org/packages/29/4e/56a727c9bd98f244bc43044b57256c9080c9dd6f1c87df3f7554d40c5930/rash-0.1.3.tar.gz" } ] }