Metadata-Version: 2.1
Name: xontrib-navi
Version: 0.0.2
Summary: Navi (interactive cli cheatsheet) integration
Home-page: https://github.com/eugenesvk/xontrib-navi
License: MIT
Keywords: xontrib,xonsh
Author: Evgeny
Author-email: es.bugzilla@gmail.com
Requires-Python: >=3.8
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Shells
Classifier: Topic :: System :: System Shells
Classifier: Topic :: Terminals
Requires-Dist: xonsh (>=0.12.5)
Project-URL: Code, https://github.com/eugenesvk/xontrib-navi
Project-URL: Documentation, https://github.com/eugenesvk/xontrib-navi/blob/master/ReadMe.md
Project-URL: Issue tracker, https://github.com/eugenesvk/xontrib-navi/issues
Project-URL: Repository, https://github.com/eugenesvk/xontrib-navi
Description-Content-Type: text/markdown

<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>


## Installation

To install use pip:

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

## Usage

1. 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

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

2. 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" # ...
```


## 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)
- The match currently works only for the whole prompt, so `git sta` will get autofilled to its best navi match of `git status`, but `git show; git sta` will fail to find any match and do nothing

## Credits

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

