{ "info": { "author": "Bryan M Bugyi", "author_email": "bryanbugyi34@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# funky [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Funky%20makes%20ZSH%20shell%20functions%20more%20powerful%20and%20easier%20to%20manage&url=https://github.com/bbugyi200/funky&via=bryan_bugyi&hashtags=python,Linux,commandlineftw,developers)\n\n**Funky takes shell functions to the next level by making them easier to define, more flexible, and more interactive.**\n\n[![Build Status](https://travis-ci.org/bbugyi200/funky.svg?branch=master)](https://travis-ci.org/bbugyi200/funky) [![codecov](https://codecov.io/gh/bbugyi200/funky/branch/master/graph/badge.svg)](https://codecov.io/gh/bbugyi200/funky) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n![demo]\n\n## Usage\nFunks are manipulated using the `funky` and `gfunky` commands. These commands have the same user interface, which is specified in the [Command-line Interface](#cli) section. The difference between the two commands is treated in the [Local vs Global](#lvg) section.\n\n### Command-line Interface\n```\nusage: funky [-h] [-d] [-v] [--version] [--color {y,n}] [-a FUNK] [-r [FUNK]]\n [-e FUNK] [-R OLD NEW]\n [FUNK]\n\nFunky makes ZSH shell functions more powerful and easier to manage.\n\noptional arguments:\n -h, --help show this help message and exit\n -d, --debug Enable debug mode.\n -v, --verbose Enable verbose output.\n --version show program's version number and exit\n --color {y,n} Colorize funk definitions.\n\nAction Commands:\n All of these options act on the current set of local funks in some way. If\n no action command is provided, the default action is to display all of the\n local funks currently in scope. These commands are mutually exclusive.\n\n -a FUNK Add a new funk.\n -r [FUNK] Remove an existing funk. Or (if FUNK is not given) remove all\n funks defined in this directory.\n -e FUNK Edit an existing funk.\n -R OLD NEW Rename an existing funk. OLD funk is renamed to NEW.\n FUNK When no action command is specified, the default action is to\n display existing funks. An funk name (FUNK) can optionally be\n provided as an argument to display only FUNK. If FUNK ends in\n two periods ('..'), it is treated as a prefix instead of an\n exact match: all funks that start with FUNK (not including\n the trailing '..') will be displayed.\n```\n\n### Local vs Global\n\n**Local** funks are stored using a hidden database file that is located in the same directory\nwhere the funk was created. These can be manipulated using the action command options described\nabove. Once created, a local funk can be used just like any other command or normal funk---as\nlong as you have activated the provided shell extension (see [Additional Install Steps](#AIS)) and are\ninside of the directory where the local funk was originally defined.\n\n**Global** funks, on the other hand, are stored in your home directory (``/home/``) and can\nbe used from any directory. Local funks can be used to override global funk definitions.\n\nLocal and global funks can be manipulated (created, removed, edited, renamed, etc.) by using the\n``funky`` and ``gfunky`` commands, respectively.\n\n### Funk Definition Shortcuts\n\nNormally when defining a funk, the provided raw definition (the final contents of the temp file) is inserted directly into the generated function definition. However, funky does try to make some alterations to the original funk definition when doing so is convenient. These *funky definition shortcuts* can make defining funks faster:\n\n#### Special `cd` Funks\n\nA funk definition of the form `@./relative/path/to/directory` will be automatically changed to\n\n``` bash\ncd /absolute/path/to/directory/\"$@\" || return 1\n```\n\n#### Simulate Shell Variables\n\nA funk definition of the form `\"Some string here...\"` will be automatically changed to\n\n``` bash\necho \"Some string here...\" \"$@\"\n```\n\nThis allows you to use funks to simulate shell variables via [command substitution](https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html).\n\n#### The \"$@\" Special Parameter\n\nThis project originally used aliases. The decision to migrate to shell functions was made based on\nthe fact that shell functions are far more capable than aliases. Moreover, there is very little\nbenefit to using aliases over shell functions.\n\nWith that said, actual aliases do have one appeal over shell functions. When you use an alias, any\narguments that you pass to it are automatically passed to the command definition (at runtime,\naliases are just substituted with their definitions). For the purpose of emulating this behavior\nwhen it would typically be desired, a funk defined using a **single-line** command definition\nthat **does NOT already contain argument variables** (e.g. does not contain `$0`, `$1`, ...,\n`$9`, `$*`, or `$@`) will automatically have the `\"$@\"` special parameter appended to its\ndefinition. This allows for the same automatic argument handling that you would expect from an\nalias.\n\nSee the official [Bash docs] for more information on Bash's special parameters.\n\n[Bash docs]: https://www.gnu.org/software/bash/manual/html_node/Special-Parameters.html \n\n\n## Installation\n\n#### Using `pip` to Install\n\nTo install funky, run this command in your terminal:\n\n``` shell\n$ pip install pyfunky\n```\n\nThis is the preferred method to install funky, as it will always install the most recent stable release.\n\nIf you don't have [pip] installed, this [Python installation guide] can guide\nyou through the process.\n\n[pip]: https://pip.pypa.io\n[Python installation guide]: http://docs.python-guide.org/en/latest/starting/installation/\n\n\n#### Building from Source\n\nYou can either clone the public repository:\n\n``` shell\n$ git clone git://github.com/bbugyi200/funky\n```\n\nOr download the [tarball]:\n\n``` shell\n$ curl -OL https://github.com/bbugyi200/funky/tarball/master\n```\n\nOnce you have a copy of the source, you can install funky by running:\n\n``` shell\nmake install\n```\n\n#### Additional Installation Steps\n\nFor the best experience, funky needs to be integrated into your shell environment using the\nprovided shell script.\n\nA shell script by the name of `funky.sh` should have been copied to\n\n``` shell\n$XDG_DATA_HOME/funky/funky.sh\n```\n\nduring the installation process (it can also be found [here][funky.sh]). You can integrate funky into your shell by sourcing the `funky.sh` script into your shell's configuration file. Assuming the script was copied to `~/.local/share/funky/funky.sh` (its default location), for example, you would add the following line to your `.zshrc` OR `bashrc`:\n\n``` shell\n[ -f ~/.local/share/funky/funky.sh ] && source ~/.local/share/funky/funky.sh\n```\n\nIf you install funky with root permissions, the ``funky.sh`` script will instead be installed to ``/usr/share/funky/funky.sh``.\n\n## Similar Projects\n\n* [Desk](https://github.com/jamesob/desk) - A lightweight workspace manager for the shell\n\n\n## Contributions\n\nPull requests are welcome. See [CONTRIBUTING.md](https://github.com/bbugyi200/funky/blob/master/CONTRIBUTING.md) for more information.\n\n[logo]: https://raw.githubusercontent.com/bbugyi200/funky/master/img/logo-96.png\n[travis]: https://travis-ci.org/bbugyi200/funky.svg?branch=master\n[codecov]: https://codecov.io/gh/bbugyi200/funky/branch/master/graph/badge.svg\n[demo]: https://raw.githubusercontent.com/bbugyi200/funky/master/img/demo.gif \"Funky Demonstration GIF\"\n[funky.sh]: https://github.com/bbugyi200/funky/blob/master/scripts/shell/funky.sh\n[Github repo]: https://github.com/bbugyi200/funky\n[tarball]: https://github.com/bbugyi200/funky/tarball/master", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bbugyi200/funky", "keywords": "funky", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "pyfunky", "package_url": "https://pypi.org/project/pyfunky/", "platform": "", "project_url": "https://pypi.org/project/pyfunky/", "project_urls": { "Homepage": "https://github.com/bbugyi200/funky" }, "release_url": "https://pypi.org/project/pyfunky/3.4.0/", "requires_dist": null, "requires_python": "", "summary": "Funky makes ZSH shell functions more powerful and easier to manage.", "version": "3.4.0" }, "last_serial": 5535171, "releases": { "3.0.1": [ { "comment_text": "", "digests": { "md5": "3dcb357758c017d74bd73aab8be208c0", "sha256": "cf1e9d0579b78a4a39291073cbfd6eb017eba76509c296142851c4cf56798b3b" }, "downloads": -1, "filename": "pyfunky-3.0.1.tar.gz", "has_sig": false, "md5_digest": "3dcb357758c017d74bd73aab8be208c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 383682, "upload_time": "2018-11-11T08:17:33", "url": "https://files.pythonhosted.org/packages/23/9c/d4030b175b831cc99bbe0962c4d67f3a22304f6b8009483641baee825ace/pyfunky-3.0.1.tar.gz" } ], "3.0.2": [ { "comment_text": "", "digests": { "md5": "8a404b8dbe451f578558c0aefbcae523", "sha256": "2f1d1908533e6d044c5295ba2459945c347f00bc348c97cd3c5ca671aeee6c6e" }, "downloads": -1, "filename": "pyfunky-3.0.2.tar.gz", "has_sig": false, "md5_digest": "8a404b8dbe451f578558c0aefbcae523", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21676, "upload_time": "2018-11-19T17:48:44", "url": "https://files.pythonhosted.org/packages/a0/4d/8274321426550974ee075f43e128a8a539f0d5e4cef62c5bba1fd18ab71a/pyfunky-3.0.2.tar.gz" } ], "3.0.3": [ { "comment_text": "", "digests": { "md5": "bfb19de5ad1f200a2aa91d8ae77bdb72", "sha256": "86ab1f07d5f089f4137ca5f5c2ac5a7e6ba3fcab4d83601b22daa428d7286d0e" }, "downloads": -1, "filename": "pyfunky-3.0.3.tar.gz", "has_sig": false, "md5_digest": "bfb19de5ad1f200a2aa91d8ae77bdb72", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21684, "upload_time": "2018-11-19T18:30:26", "url": "https://files.pythonhosted.org/packages/aa/38/87d9e505d1e6c4cdb45674efad2461569f1078f34f8877b30024f437fa41/pyfunky-3.0.3.tar.gz" } ], "3.0.4": [ { "comment_text": "", "digests": { "md5": "a3d75e653f5eb1a0893d013844c90636", "sha256": "4167f84174a49b5c6fa92dc9bb7ecbf18700d304ef26cab5897836708f88f12a" }, "downloads": -1, "filename": "pyfunky-3.0.4.tar.gz", "has_sig": false, "md5_digest": "a3d75e653f5eb1a0893d013844c90636", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21674, "upload_time": "2018-11-19T19:23:24", "url": "https://files.pythonhosted.org/packages/1b/6b/444057a2205b17dbf959c5ae78d2479558e866119f0619dc2654718b4463/pyfunky-3.0.4.tar.gz" } ], "3.0.5": [ { "comment_text": "", "digests": { "md5": "1db9c35d86071e671acd2d36511692b8", "sha256": "a5332b14babfd75a07d8219b2cfc7e5ce842a9b9be67213cdc5e4fe4fa3749a8" }, "downloads": -1, "filename": "pyfunky-3.0.5.tar.gz", "has_sig": false, "md5_digest": "1db9c35d86071e671acd2d36511692b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21668, "upload_time": "2018-11-19T19:40:17", "url": "https://files.pythonhosted.org/packages/9c/20/80673f4dd956ccbf0b0766fadf2c804876618ccb29ebb5a26bbb9f93d4e3/pyfunky-3.0.5.tar.gz" } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "2564606b09e7774b72ecb81458af3b92", "sha256": "22f20dc7047251df44e98ae4e18244bc1d85312d3b58c54432a1f136b3919646" }, "downloads": -1, "filename": "pyfunky-3.1.0.tar.gz", "has_sig": false, "md5_digest": "2564606b09e7774b72ecb81458af3b92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21519, "upload_time": "2018-11-19T21:08:39", "url": "https://files.pythonhosted.org/packages/d9/e6/1756d6c1685ae1ec68e01c3d33ce78251a19606954fed86e07242d4544cc/pyfunky-3.1.0.tar.gz" } ], "3.1.1": [ { "comment_text": "", "digests": { "md5": "c6ebd6305a6121faa74a6d510f2fedfa", "sha256": "e48d25c11e3c5a0caf1ec489dcf47d15d169f64e34a5fe154dabcee69396a929" }, "downloads": -1, "filename": "pyfunky-3.1.1.tar.gz", "has_sig": false, "md5_digest": "c6ebd6305a6121faa74a6d510f2fedfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21531, "upload_time": "2018-11-22T02:03:20", "url": "https://files.pythonhosted.org/packages/a3/38/fe70b3e28dac101e202948d1f4ae834b70809130e5ce4161eb4dc2badbbd/pyfunky-3.1.1.tar.gz" } ], "3.2.0": [ { "comment_text": "", "digests": { "md5": "6d35756320b4fb13553190dda038789e", "sha256": "1f3941a1f297f9a9f7813da275f2051691384426823345f996d03bd067f0cdba" }, "downloads": -1, "filename": "pyfunky-3.2.0.tar.gz", "has_sig": false, "md5_digest": "6d35756320b4fb13553190dda038789e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22153, "upload_time": "2018-11-27T17:25:18", "url": "https://files.pythonhosted.org/packages/26/de/b326322765b1a5e36efb9c2389ac78f14229872d5bfba1d9351eeb32d976/pyfunky-3.2.0.tar.gz" } ], "3.3.0": [ { "comment_text": "", "digests": { "md5": "d409caee2eeee070d61e759a5ed9a07e", "sha256": "e3a02fb39ec0556ba1a03ba105829a92050898e15375819533ddd72dec89baed" }, "downloads": -1, "filename": "pyfunky-3.3.0.tar.gz", "has_sig": false, "md5_digest": "d409caee2eeee070d61e759a5ed9a07e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21837, "upload_time": "2019-01-14T03:46:18", "url": "https://files.pythonhosted.org/packages/c2/73/092c970f9f8374af871c0a55213cae1e5bceb570e9ffa38dc43ab01afaa4/pyfunky-3.3.0.tar.gz" } ], "3.3.1": [ { "comment_text": "", "digests": { "md5": "d106f8eb107f06534e2fe8507ee50a6b", "sha256": "ba3b08f487066e52b8ba04c37ea5b72158be823d9f40e4a838674c3d9ef6b42b" }, "downloads": -1, "filename": "pyfunky-3.3.1.tar.gz", "has_sig": false, "md5_digest": "d106f8eb107f06534e2fe8507ee50a6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21820, "upload_time": "2019-01-24T17:26:00", "url": "https://files.pythonhosted.org/packages/ed/e4/5b4b5e35c616df8fd8b952e072f2d46510cf64b0d0405e0d7e6d212163aa/pyfunky-3.3.1.tar.gz" } ], "3.4.0": [ { "comment_text": "", "digests": { "md5": "225891a3d6ef9c48ed439ed10f6281c9", "sha256": "9a14a52254e779a5b68696f80e87e44527ffc7ffd7fa671b7d12d079e07b9d37" }, "downloads": -1, "filename": "pyfunky-3.4.0.tar.gz", "has_sig": false, "md5_digest": "225891a3d6ef9c48ed439ed10f6281c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22680, "upload_time": "2019-07-15T14:20:42", "url": "https://files.pythonhosted.org/packages/ac/a9/fa626fa805b2f1af6c7e516a7ffb573e9068ad1421b65061dbae82b523df/pyfunky-3.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "225891a3d6ef9c48ed439ed10f6281c9", "sha256": "9a14a52254e779a5b68696f80e87e44527ffc7ffd7fa671b7d12d079e07b9d37" }, "downloads": -1, "filename": "pyfunky-3.4.0.tar.gz", "has_sig": false, "md5_digest": "225891a3d6ef9c48ed439ed10f6281c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22680, "upload_time": "2019-07-15T14:20:42", "url": "https://files.pythonhosted.org/packages/ac/a9/fa626fa805b2f1af6c7e516a7ffb573e9068ad1421b65061dbae82b523df/pyfunky-3.4.0.tar.gz" } ] }