lasantosr / intelli-shell Goto Github PK
View Code? Open in Web Editor NEWLike IntelliSense, but for shells
License: Apache License 2.0
Like IntelliSense, but for shells
License: Apache License 2.0
~
❯ yay -Qo tomlq
/usr/bin/tomlq is owned by yq 3.2.2-2
~
❯ tomlq -r '.snippets[] | .command |= gsub("<(?<param>[^>]+)>"; "{{ \(.param) }}") | .command + " ## " + .description' ~/.config/pet/snippet.toml > commands.txt
~
❯ intelli-shell import commands.txt
-> Imported 1271 new commands
~/.local/share/intelli-shell/storage.db3
).Thnx
I think it would be cool if hints weren't removed by mismatch when a parameter is given with a hyphen. This would make using the program much more convenient.
Docker commands can serve as an illustration of this. For instance, imagine wanting to insert a parameter with a hyphen in the middle of a frequently used Docker command, such as -v volume:path or -d.
How can this be implemented? For example, one approach might be to temporarily ignore the matching with the input when a hotkey is pressed, and enable it again with the same key press. Simply ignoring parameters starting with a hyphen wouldn't be not possible since, most of the time, values following hyphen-prefixed parameters don't start with a hyphen, and suggestions would be lost due to the mismatch.
It is not possible to add these options at the end, as it is not allowed by the specific command syntax. Re-editing the received command can be quite tedious.
I get this:
% intelli-shell fetch
zsh: no such file or directory: /Users/julien/Library/Application
It seems like the space for Application Support
isn't being escaped somewhere?
Hi!
I found your project via your comment in the pet repo.
After looking trough the repo briefly, my assumption is, that on windows, intelli-shell will only work within a wsl shell, correct?
Is a powershell integration even possible?
Hello, Thanks very much for such a wonderful tool to improve my efficiency. But I am facing a trouble, and I am not sure whether that's because I have made some mistakes during my installing this tools.
After I installed it, and type the command below:
intelli-shell -h
I could get nothing from the terminal, and after I typed the command:
intelli-shell fetch
there was still no reaction from the terminal.
My PC Imformation:
❯ intelli-shell
zsh: no such file or directory: /home/vaisakh/.local/share/intelli-shell/bin/intelli-shell
[vaisakh@nixos:~]$ intelli-shell
bash: /home/vaisakh/.local/share/intelli-shell/bin/intelli-shell: cannot execute: required file not found
❮ ls .local/share/intelli-shell/bin
intelli-shell intelli-shell.fish intelli-shell.sh
getting this error even though file exists, and the file has executable permission
Hello, @lasantosr! All my commands that I run after receiving them from intelli-shell
fall due to such an error:
$ dconf list
error: no command specified
If I get the command back with the up arrow, and execute it again, then everything works.
Second example:
$ docker ps --all
Usage: docker [OPTIONS] COMMAND
Third example:
$ ps aux
PID TTY TIME CMD
11720 pts/0 00:00:00 bash
11890 pts/0 00:00:00 ps
Tried this in the ubuntu:latest
container from docker
and it works great!
OS: Fedora 37
Shell: GNU bash, version 5.2.15(1)-release (x86_64-redhat-linux-gnu)
Whatcould I do with this with an iPhone 11
intelli-shell 0.2.3
in zsh 5.9
I tried to use it for following script to try to take advantage of labels' expanding functionality
cd {{ part_dir }}
inotifywait -e close_write,moved_to,create -m . |
while read -r directory events filename; do
if [ "$filename" = {{ file_name_quoted }} ]; then
bash {{ file_name }}
fi
done
And it produced the following output
cd part_dir inotifywait -e close_write,moved_to,create -m . |while read -r directory events filename; doif [ "$filename" = "filename.sh" ]; thenbash filename.shfidone
Maybe, adding support for multiline is a bit over the top, and the program was never intended to be used in such way, but i created an issue nevertheless, just in case)
from plugin import PluginMaster, PluginInstance
import commands
import session
import ui
import log
import config
import tools
class DashboardPluginMaster(PluginMaster):
Name = 'Dashboard'
def OnLoad(self):
PluginMaster.OnLoad(self)
def MakeInstance(self):
i = DashboardPluginInstance()
self.Instances.append(i)
return i
class DashboardPluginInstance(PluginInstance):
Name = 'Dashboard'
_lblServerName = None
_lblAjentiVer = None
_lblDistro = None
def OnLoad(self, s):
PluginInstance.OnLoad(self, s)
c = ui.Category()
c.Text = 'Dashboard'
c.Description = 'Server status'
c.Icon = 'plug/dashboard;icon'
self.CategoryItem = c
self.BuildPanel()
log.info('DashboardPlugin', 'Started instance')
return
def BuildPanel(self):
self._lblServerName = ui.Label()
self._lblAjentiVer = ui.Label()
self._lblDistro = ui.Label()
self._lblServerName.Size = 5
c = ui.HContainer([ui.Image('plug/dashboard;server.png'), ui.Spacer(10,1), ui.VContainer([self._lblServerName, self._lblDistro, self._lblAjentiVer])])
self.Panel = ui.Container([c])
return
def Update(self):
self._lblServerName.Text = config.ServerName
self._lblAjentiVer.Text = ' Ajenti ' + config.AjentiVersion
self._lblDistro.Text = ' ' + tools.Actions['core/detect-distro'].Run(None)
return
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.