- Notifications
You must be signed in to change notification settings - Fork6
Like IntelliSense, but for shells
License
lasantosr/intelli-shell
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Like IntelliSense, but for shells!
IntelliShell acts like a bookmark store for commands, so you don't have to keep your history clean in order to be ableto find something useful withctrl + R
.
It currently works on Bash, Zsh, Fish and PowerShell and should be compatible with most Linux, Windows and MacOS.
Install the binaries:
curl -sSf https://raw.githubusercontent.com/lasantosr/intelli-shell/main/install.sh| bash
Bookmark your first command by typing it on a terminal and using
ctrl + b
(optional) Run
intelli-shell fetch
to download commands fromtldrHit
ctrl + space
to begin the journey!(optional) Check out thetips section below to get some ideas
- Standalone binaries
- Autocomplete currently typed command
- Full Text Search in both command and description with hashtag support on descriptions
- Find & replace labels of currently typed command
- Edit bookmarked commands and provide aliases
- Non-intrusive (inline) and full-screen interfaces
- Fetch command to parse and storetldr pages (Thanks to them!)
- Portability. You can use bookmarked commands in any supported shell, as well as exporting and importing elsewhere.
Remember to bookmark some commands or fetch them after the installation!
To skip profile updates, setINTELLI_SKIP_PROFILE
environment variable to1
before installing.
curl -sSf https://raw.githubusercontent.com/lasantosr/intelli-shell/main/install.sh| bash
After installing it using bash, it should work in any supported shell.
Set-ExecutionPolicy RemoteSigned-Scope CurrentUser# Optional: Needed to run a remote script the first timeirm https://raw.githubusercontent.com/lasantosr/intelli-shell/main/install.ps1| iex
After installing it with powershell, it should also work on cmd (without hotkeys).
To install from source you'll need to have Rust installed, which is recommended to be installed usingrustup.
cargo install intelli-shell --locked
To enable hotkeys, additional steps are required:
Linux
Download source script:
Bash / Zsh:
mkdir -p~/.local/share/intelli-shell/bincurl -sSf https://raw.githubusercontent.com/lasantosr/intelli-shell/main/intelli-shell.sh>~/.local/share/intelli-shell/bin/intelli-shell.sh
Fish:
mkdir -p~/.local/share/intelli-shell/bincurl -sSf https://raw.githubusercontent.com/lasantosr/intelli-shell/main/intelli-shell.fish>~/.local/share/intelli-shell/bin/intelli-shell.fish
Edit your profile to source it:
Bash / Zsh:
~/.bashrc
,~/.zshrc
or~/.bash_profile
source~/.local/share/intelli-shell/bin/intelli-shell.sh
Fish:
~/.config/fish/config.fish
:source~/.local/share/intelli-shell/bin/intelli-shell.fish
Windows
Download the source script also:
New-Item-Path$env:APPDATA\IntelliShell\Intelli-Shell\data\bin-Type DirectoryInvoke-WebRequest-UseBasicParsing-URI"https://raw.githubusercontent.com/lasantosr/intelli-shell/main/intelli-shell.ps1"-OutFile$env:APPDATA\IntelliShell\Intelli-Shell\data\bin\intelli-shell.ps1
Edit your$Profile
to execute it:
.$env:APPDATA\IntelliShell\Intelli-Shell\data\bin\intelli-shell.ps1
You can view supported actions by runningintelli-shell -h
. Most used standalone commands are:
intelli-shell fetch [category]
to fetchtldr commands and store them.[category] can be skipped or a valid folder from tldr'spagesintelli-shell export
to export user-bookmarked commands (won't exporttldr's commands)intelli-shell import user_commands.txt
to import commands into the user category
ctrl + b
bookmark currently typed commandctrl + space
show suggestions for current linectrl + l
replace labels of currently typed commandesc
clean current line, this binding can be skipped ifINTELLI_SKIP_ESC_BIND=1
Note: When navigating items, selected suggestion can be deleted withctrl + d
or edited with any of:ctrl + e
,ctrl + u
orF2
You can customize key bindings using environment variables:INTELLI_BOOKMARK_HOTKEY
,INTELLI_SEARCH_HOTKEY
andINTELLI_LABEL_HOTKEY
When the search criteria matches an alias or produces a single result, it's automatically autocompleted!
- The label UI will still be shown if the command contains labels
You can alias common commands to store some kind of favorite labels, for example bookmark
cd {{path}}
and give it acd
alias- You can regularly use
cd
but if you hitctrl + space
it will show your "pinned" folders
- You can regularly use
Long commands or even functions can also be bookmarked
- For example
function custom_echo () { echo "hey: $@"; }; custom_echo {{text}};
- For example
You can avoid labels to be stored and keep them secret if wrapped between '*' :
echo {{*my-secret*}}
Label suggestions are stored based on the root command and the label name, which gives you flexibility to decide.
For these two commands, the same images will be suggested:
docker run {{--rm}} {{--interactive}} {{image}}
docker rmi {{--no-prune}} {{image}}
But these two commands will suggest different volumes:
docker run --volume {{image-1-volumes}} image-1
docker run --volume {{image-2-volumes}} -p {{image-2-ports}} image-2
Include hashtags on descriptions like
#cool
and use them while searching
- Labels support to store most used labels and select them using a dedicated UI
- Usability improvements to manage stored commands (including aliases)
- Support for more terminals
- Fish
- PowerShell
- Export also labels and UI to filter what to export
- Deploy to package managers
- Sync user bookmarks using some public / private Git repo
You might want to have a look atMarker which is pretty similar but requires Pythonto be installed on your system.
IntelliShell is licensed under the Apache License, Version 2.0. SeeLICENSE for the full license text.
About
Like IntelliSense, but for shells
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.