xontrib-navi


Namexontrib-navi JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/eugenesvk/xontrib-navi
SummaryNavi (interactive cli cheatsheet) integration
upload_time2024-07-20 13:21:43
maintainerNone
docs_urlNone
authorEvgeny
requires_python<4.0,>=3.9
licenseMIT
keywords xontrib xonsh
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
<a href="https://github.com/denisidoro/navi">navi</a> (interactive cli cheatsheet) integration into <a href="https://xon.sh/">xonsh</a> (shell)
</p>

<p align="center">  
If you like the idea click ⭐ on the repo
</p>


## Install

```xsh
xpip install xontrib-navi
# or: xpip install -U git+https://github.com/eugenesvk/xontrib-navi
```

## Configure

- Add the following to your `.py` xontrib loading config and `import` it in your xonsh run control file (`~/.xonshrc` or `~/.config/rc.xsh`):
```py
from xonsh.xontribs 	import xontribs_load
from xonsh.built_ins	import XSH
envx = XSH.env

xontribs = [ "navi", # Initializes navi (interactive cli cheatsheet)
 # your other xontribs
] # ↓ optional configuration variables (use `False` to disable a keybind)
if 'navi' in xontribs: # Configure navi only if you're actually loading it
  # config var           	  value	 |default|alt_cmd¦ comment
  envx["X_NAVI_KEY"]     	= "⎈g" 	#|c-g|   False¦ Autofill existing command with navi's best match or launch navi if no good match found
  envx["x_navi_key_skim"]	= "⎇g" 	#False          Autofill existing command with navi's best match or launch navi if no good match found (skim)
  # run to see the allowed list for ↑: from prompt_toolkit.keys import ALL_KEYS; print(ALL_KEYS)
  # Alt is also supported as either of: a- ⎇ ⌥ (converted to a prefix 'escape')
  # Control symbols are also supported as either of: ⎈ ⌃

xontribs_load(xontribs) # actually load all xontribs in the list
```

- Or just add this to your xonsh run control file
```xsh
xontrib load navi # Initializes navi (interactive cli cheatsheet)
# configure like in the example above, but replace envx['VAR'] with $VAR
$X_NAVI_KEY     	= "c-g" # ...
$x_navi_key_skim	= ["escape","g"] # ...
```

## Use

- <kbd>⎈</kbd><kbd>g</kbd> run navi
- `git sta` <kbd>⎈</kbd><kbd>g</kbd> `git status` autoreplace with navi's best match
- `git status` <kbd>⎈</kbd><kbd>g</kbd> run navi with current command as search input
- `git sta‸; git show` <kbd>⎈</kbd><kbd>g</kbd> `git status‸; git show` autoreplace only the command at ‸cursor


## Known issues

- Bottom toolbar may temporary disappear on some invokations of the commands in this xonrib likely due to this [xonsh issue](https://github.com/xonsh/xonsh/issues/5084)

## Credits

This package was created with [xontrib template](https://github.com/xonsh/xontrib-template)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/eugenesvk/xontrib-navi",
    "name": "xontrib-navi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "xontrib, xonsh",
    "author": "Evgeny",
    "author_email": "es.bugzilla@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/18/95/ef7fe805c4a456b944ad218e8ec571c9295a2d2004313d0735f5f7a19739/xontrib_navi-0.0.7.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n<a href=\"https://github.com/denisidoro/navi\">navi</a> (interactive cli cheatsheet) integration into <a href=\"https://xon.sh/\">xonsh</a> (shell)\n</p>\n\n<p align=\"center\">  \nIf you like the idea click \u2b50 on the repo\n</p>\n\n\n## Install\n\n```xsh\nxpip install xontrib-navi\n# or: xpip install -U git+https://github.com/eugenesvk/xontrib-navi\n```\n\n## Configure\n\n- Add the following to your `.py` xontrib loading config and `import` it in your xonsh run control file (`~/.xonshrc` or `~/.config/rc.xsh`):\n```py\nfrom xonsh.xontribs \timport xontribs_load\nfrom xonsh.built_ins\timport XSH\nenvx = XSH.env\n\nxontribs = [ \"navi\", # Initializes navi (interactive cli cheatsheet)\n # your other xontribs\n] # \u2193 optional configuration variables (use `False` to disable a keybind)\nif 'navi' in xontribs: # Configure navi only if you're actually loading it\n  # config var           \t  value\t |default|alt_cmd\u00a6 comment\n  envx[\"X_NAVI_KEY\"]     \t= \"\u2388g\" \t#|c-g|   False\u00a6 Autofill existing command with navi's best match or launch navi if no good match found\n  envx[\"x_navi_key_skim\"]\t= \"\u2387g\" \t#False          Autofill existing command with navi's best match or launch navi if no good match found (skim)\n  # run to see the allowed list for \u2191: from prompt_toolkit.keys import ALL_KEYS; print(ALL_KEYS)\n  # Alt is also supported as either of: a- \u2387 \u2325 (converted to a prefix 'escape')\n  # Control symbols are also supported as either of: \u2388 \u2303\n\nxontribs_load(xontribs) # actually load all xontribs in the list\n```\n\n- Or just add this to your xonsh run control file\n```xsh\nxontrib load navi # Initializes navi (interactive cli cheatsheet)\n# configure like in the example above, but replace envx['VAR'] with $VAR\n$X_NAVI_KEY     \t= \"c-g\" # ...\n$x_navi_key_skim\t= [\"escape\",\"g\"] # ...\n```\n\n## Use\n\n- <kbd>\u2388</kbd><kbd>g</kbd> run navi\n- `git sta` <kbd>\u2388</kbd><kbd>g</kbd> `git status` autoreplace with navi's best match\n- `git status` <kbd>\u2388</kbd><kbd>g</kbd> run navi with current command as search input\n- `git sta\u2038; git show` <kbd>\u2388</kbd><kbd>g</kbd> `git status\u2038; git show` autoreplace only the command at \u2038cursor\n\n\n## Known issues\n\n- Bottom toolbar may temporary disappear on some invokations of the commands in this xonrib likely due to this [xonsh issue](https://github.com/xonsh/xonsh/issues/5084)\n\n## Credits\n\nThis package was created with [xontrib template](https://github.com/xonsh/xontrib-template)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Navi (interactive cli cheatsheet) integration",
    "version": "0.0.7",
    "project_urls": {
        "Code": "https://github.com/eugenesvk/xontrib-navi",
        "Documentation": "https://github.com/eugenesvk/xontrib-navi/blob/master/ReadMe.md",
        "Homepage": "https://github.com/eugenesvk/xontrib-navi",
        "Issue tracker": "https://github.com/eugenesvk/xontrib-navi/issues",
        "Repository": "https://github.com/eugenesvk/xontrib-navi"
    },
    "split_keywords": [
        "xontrib",
        " xonsh"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d8337ae376d7975edbd68920d008992890ba9b51a5b2c54c4884965b272017e9",
                "md5": "6b6d512c1a742a2d9736d6b91062c6c4",
                "sha256": "258c7efb6bafe4edcf2f7ca1d41d8149407ec6123e0ea391e801fb001e3f6b64"
            },
            "downloads": -1,
            "filename": "xontrib_navi-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6b6d512c1a742a2d9736d6b91062c6c4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 5177,
            "upload_time": "2024-07-20T13:21:42",
            "upload_time_iso_8601": "2024-07-20T13:21:42.369528Z",
            "url": "https://files.pythonhosted.org/packages/d8/33/7ae376d7975edbd68920d008992890ba9b51a5b2c54c4884965b272017e9/xontrib_navi-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1895ef7fe805c4a456b944ad218e8ec571c9295a2d2004313d0735f5f7a19739",
                "md5": "24b6580ed96596d5ca213f24c09549a1",
                "sha256": "ab57f1402fca3577b479d3084d26059990dc265275f408b6a2d9895c82db1b60"
            },
            "downloads": -1,
            "filename": "xontrib_navi-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "24b6580ed96596d5ca213f24c09549a1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 5015,
            "upload_time": "2024-07-20T13:21:43",
            "upload_time_iso_8601": "2024-07-20T13:21:43.698220Z",
            "url": "https://files.pythonhosted.org/packages/18/95/ef7fe805c4a456b944ad218e8ec571c9295a2d2004313d0735f5f7a19739/xontrib_navi-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-20 13:21:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "eugenesvk",
    "github_project": "xontrib-navi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "xontrib-navi"
}
        
Elapsed time: 0.44220s