Project Overview: inshellisense
inshellisense
offers an intelligent solution for shell users by providing IDE-style autocompletion directly in the terminal. It enhances the command-line experience with a robust autocomplete feature that supports more than 600 command line tools across various platforms, including Windows, Linux, and macOS.
Getting Started with inshellisense
To kick off your journey with inshellisense
, there are a few requirements and steps. First, ensure that you have Node.js versions 16.6.0 or higher (specifically 16.X, 18.X, or 20.X). Once ready, the installation is straightforward:
npm install -g @microsoft/inshellisense
After the setup, initiate an autocomplete session in your desired shell using the command is
. Alternatively, you can start the service with the alias inshellisense
.
Shell Plugin
For users seeking a seamless startup, inshellisense
can be integrated to launch automatically with any new shell session. This setup involves running specific commands for different shells:
- Bash:
is init bash >> ~/.bashrc
- Zsh:
is init zsh >> ~/.zshrc
- Fish:
is init fish >> ~/.config/fish/config.fish
- Powershell (pwsh):
is init pwsh >> $profile
- Windows Powershell:
is init powershell >> $profile
- Xonsh:
is init xonsh >> ~/.xonshrc
- Nushell:
is init nu | save $nu.env-path --append
Note: Ensure the
inshellisense
plugin command appears last in the configuration file to avoid configuration issues due to subsequent commands.
Utilization
inshellisense
is packed with straightforward commands and keybindings to optimize its use:
- Start: Use
is
to start a session. - Stop: Use
exit
to close a session. - Check Session: Use
is -c
to verify if the current shell is inside a session.
Keybindings
While inshellisense
captures essential keystrokes when suggestions are visible, all other inputs are processed by the shell. Default keybindings include:
- Accept Suggestion: Tab
- Next Suggestion: ↓
- Previous Suggestion: ↑
- Dismiss Suggestions: Esc
Wide Shell Integration
The tool seamlessly integrates with various shells, ensuring broad compatibility:
- Bash
- Zsh
- Fish
- Pwsh (PowerShell)
- Cmd (experimental)
- Xonsh
- Nushell
Configuration Options
Users can customize the functionality of inshellisense
through a toml
configuration file, placed either at ~/.inshellisenserc
or ~/.config/inshellisense/rc.toml
. Further customization, such as keybindings, is also accessible via this file:
[bindings.acceptSuggestion]
key = "tab"
shift = false
ctrl = false
[bindings.nextSuggestion]
key = "down"
[bindings.previousSuggestion]
key = "up"
[bindings.dismissSuggestions]
key = "escape"
Contributing to inshellisense
The project is open for contributions and improvements, encouraging developers to participate. Contributors need to agree to Microsoft's Contributor License Agreement (CLA) to assure rights to contributions. More information is available through the Microsoft Open Source Code of Conduct.
Trademarks
Use of Microsoft trademarks or logos should comply with Microsoft's Trademark & Brand Guidelines. Usage in modified versions of the project should not imply Microsoft’s sponsorship. Third-party trademark usage requires compliance with their respective policies.