withfig / autocomplete Goto Github PK
View Code? Open in Web Editor NEWIDE-style autocomplete for your existing terminal & shell
Home Page: https://fig.io
License: MIT License
IDE-style autocomplete for your existing terminal & shell
Home Page: https://fig.io
License: MIT License
Fig does not present filepath
suggestions when using file redirects.
After typing pbpaste >
Fig should pop up suggestions for filespaths. (Similar behavior should exists for 2>
, <
, >>
, etc)
Enhancement to fig's overall autocompletion. It's not mission-critical but since I'm so used to how zsh's autocomplete works, I feel like it should at least be put up for consideration.
For zsh the tabbed autocomplete uses a fuzzy search, instead of fig's current substr-style.
Using oh-my-zsh, go to a folder. For example containing the following:
~ ls
project-name-one
project-name-two
~ cd two
If you now press "tab", it will auto-complete to project-name-two
In this scenario, Fig would show no available autocompletions
What completion spec does this enhancement refer to? Or is it Fig itself?
Fig itself
When assigning a root command an icon the subcommands (and sub-subcommands) also need to define the same icon property in order to have the same icon.
Describe the issue that you're seeing.
icon property
at root levelThe icon should be inherited
It is not inherited
When I update the docs for one of my GitHub projects (md2pptx as it happens) I generate a bunch of user_guide.*
files. It's my practice to add them with the following command:
git add user_guide.*
Today autocomplete offers each file individually. In my case I have several I want to add all at once. I like the individual file prompting but I'd like autocomplete to also offer the generic user_guide.*
.
Hi,
I think that the autocomplete specs are really powerful and customizable. But writing them in plain JS is pain without auto-completion from IDEs. Do you plan to switch to TypeScript
in the future?
I really think that it could help a lot of peoples to contribute to new autocomplete specs.
pm2
https://pm2.keymetrics.io/docs/usage/quick-start/
pm2 start
pm2 restart all
pm2 stop
I would love to have the autocomplete functionality for React-Native Basic Commands like react-native run-ios, react-native start, etc
When looking at the GitHub repo of this project, it's unclear how to install the tool.
Please add a section about installing without requiring the user's email, thanks.
I know that the various integrations are still a work in progress, but is integration with jetbrains' terminal (IntelliJ / PHPstorm / Rider / ...) somewhere on the roadmap?
Frequently, when I am pushing a branch, I have trouble finding it in the list of suggestions because I most of my branches start with the same prefix.
Fix: indicate the current branch and move it to the top of the list.
Right now, autocomplete only works from the second command. It would be nice to get autocomplete right from first command.
Usecase:
If I have following aliases:
g=git
ga='git add'
gaa='git add --all'
gap='git apply'
gapa='git add --patch'
gau='git add --update'
gav='git add --verbose'
gb='git branch'
When I type g
, I should be able to get autocomplete for all these aliases.
It would be even better if we are also able to see the related expansion of the aliases in the autocomplete itself. Something like g(git)
, ga(git add)
, ....
Currently, if a variadic argument is followed by another argument ([ arg1... ] [ arg2 ]
), the second argument will never be prompted by Fig's autocomplete.
Expected behavior: After the first that satisfies arg1
is inserted, Fig should show suggestions for both arg1
and arg2
.
Fig itself
whenever I use a shell command supported by fig (e.g. git) autocomplete strikes immediately sometimes interrupting my thought process.
core behavior
An option to summon the completion suggestions on demand would be great
(Like hitting the TAB key in a standard shell)
autocomplete always strikes
git
Currently, Fig just shows the default icon for remote suggestions.
Fig should show the icons associated with where I host my repo. For instance, withfig/autocomplete is hosted on Github, so when I type git push
the origin
suggestion should have a Github icon.
The remote URL can be determined by running git remote -v
origin https://github.com/withfig/cdn.git (fetch)
origin https://github.com/withfig/cdn.git (push)
staging https://git.heroku.com/fig-cdn-staging.git (fetch)
staging https://git.heroku.com/fig-cdn-staging.git (push)
master
branch issue
The specs
directory contains two identic folders, _examples
and examples
which exist by default, and a third one: the example
folder which is generated after the build
command
Run the build
script and open the specs
folder
There should be only one example folder
There are three folders, _examples
and examples
which exist by default, and example
which is generated after the build
command
Delete the specs/_examples
and specs/examples
folders, and run the build
script once to generate the examples in the specs/example
directory
What CLI tool is missing autocompletion in Fig?
go
Please add some links to the docs of that tool or the --help
text
Go is a tool for managing Go source code.
Usage:
go <command> [arguments]
The commands are:
bug start a bug report
build compile packages and dependencies
clean remove object files and cached files
doc show documentation for package or symbol
env print Go environment information
fix update packages to use new APIs
fmt gofmt (reformat) package sources
generate generate Go files by processing source
get add dependencies to current module and install them
install compile and install packages and dependencies
list list packages or modules
mod module maintenance
run compile and run Go program
test test packages
tool run specified go tool
version print Go version
vet report likely mistakes in packages
Use "go help " for more information about a command.
What are the most used commands or workflows in that CLI tool (for you)?
I am not a heavy go
user (yet)!
zip
zip -r
takes a folder as an argument, so it should display filepath suggestion.
What CLI tool is missing autocompletion in Fig?
fin
(Docksal's CLI)
Please add some links to the docs of that tool or the --help
text
https://docs.docksal.io/fin/fin-help/
What are the most used commands or workflows in that CLI tool (for you)?
fin restart
fin project reset cli
fin start
fin stop
fin <custom_command> (found in .docksal/commands/*
cp
I want to copy a file to a folder (eg. cp ~/path/to/file ~/path/to/another/folder
) which is valid - however the second argument of the cp
completion spec seems to only accept a filepath. The red arrow that allows me to run the command immediately does not appear.
Fig Version: 1.0.39
OS: 10.15.7 (19H2)
Device: MacBook Pro
Add folder to templates
in completion spec.
Currently, this defaults to 5 seconds. Should we add a new property to the Generator
that allows this to be customized?
See #91 for an example of when this is necessary. (tl;dr long running commands like adb
and xcodebuild
frequently timeout)
Fig itself
shift+tab should cycle through autocomplete in reverse order
Enable tab navigation:
fig settings autocomplete.tab navigate
Press shift and tab. It won't cycle in reverse order
Should cycle in reverse order
Cycled in normal order
Hello,
I'm wondering if this tool could be used as an external ui for the autocompletion of Oh My Zsh (or any shell).
Thanks
Describe the issue that you're seeing. Slack thread
Description should wrap to at least 2-3 lines.
What CLI tool is missing autocompletion in Fig?
ripgrep and grep
Please add some links to the docs of that tool or the --help
text
https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md
https://www.gnu.org/software/grep/manual/grep.html
What are the most used commands or workflows in that CLI tool (for you)?
Searching text within directories and providing the appropriate amount of context before and after. Piping that into other outputs.
The stupid content tracker
Issue | Title | Contributor |
---|---|---|
#54 | Update git fetch |
@mattschrage |
Issue | Title | Contributor |
---|---|---|
#73 | offer a wildcard extension | @mattschrage |
#81 | already staged files should have lower priority | @mattschrage |
#37 Add quotes around args with spaces - @mattschrage
What completion spec does this bug refer to? Or is it Fig itself?
Fig itself
Describe the issue that you're seeing.
No autocomplete
Clear steps describing how to reproduce the issue. Please link to a reproduction, this makes your issue much easier to diagnose (seriously).
Use sudo before any command
What should happen?
Should ignore sudo or change permission to run the script and then ignore sudo and run autocomplete specs with sudo permission
What happened.
No autocomplete spec
Fig Version: 1.0.40 (B188)
OS: macOS Big Sur 11.3
Device: macBook
(optional) What could be a solution to solve this bug?
Should ignore sudo or change permission to run the script and then ignore sudo and run autocomplete specs with sudo permission
Any spec that has a long description.
A long description for a command or sub-command in a spec can be very long when they are gathered from an outside source (Mask descriptions for commands). For me, the side scrolling to view the entire description is a bit difficult to maneuver.
look at a description for and command that is long and you have to side scroll to see it all
expo web
is an unrecognized alias for expo start:web
Matt tells me it should be a simple fix: just finding the start:web
subcommand and then convert the name
property from a string to an array ("start:web" โ ["start:web", "web"])!
For generators that rely on slow commands (eg. adb
,xcodebuild
), it would be helpful to show a loading indicator while Fig is waiting for the output.
Several CLI tools enable users to add their own commands (rails
, laravel
, fin
).
Currently, Fig's completion spec standard supports dynamically listing suggestions for arguments, but not generating nested structures (like subcommands and options).
Request: Can we add the ability to add nested suggestions (with their own subcommands and flags) to the completion spec at runtime.
Add completions for the following:
-n
get (many options)
-l
edit
exec
delete (many options)
logs
apply -f
describe
port-forward
config
set-context
use-context
view
cordon
cp
create (MANY options)
replace
top
version
OS: macOS Big Sur - 11.2.3
Terminal: iTerm2 w/ ZSH
To change branches, I usually run the command:
git checkout -
However, since the command is just the dash, Fig thinks I want to use a flag.
I would love for flags to maybe work like specific executables work (where the first option is to run the command):
I know I can press esc
to hide the autocomplete, so this is a solution; just not ideal for this command.
This might be by design, and I know this is might be an edge case, but wanted to bring it up!
Thanks for all the hard work, Fig is great.
support linux
See summary.
Would be really cool to see a plugin for custom icons for folders, file types, etc, similar to VS Code's custom icon extensions like this.
What completion spec does this enhancement refer to? Or is it Fig itself?
Fig itself
Currently fig suggest the same option as many times as one types --
example:
command subcommand --option1 foo --option1
Describe the issue that you're seeing.
Clear steps describing how to reproduce the issue. Please link to a reproduction, this makes your issue much easier to diagnose (seriously).
What should happen?
If an option has been already autocompleted, do not suggest it again
What happened.
Fig itself? I don't really know, sorry! ๐
When using ENV variables before any command, the autocomplete stops working.
ENV=1
or any combination of {name}={value}
;We should see the autocomplete window for what I'm typing.
Just following the instruction works until npm run dev
. The npm run create-boilerplate
says there isn't a script with that name.
yarn
None of the yarn
subcommands have descriptions
The commands npm run dev
, npm copy
and npm copy:all
don't work.
The commands just work fine
They don't work
Node Version: v15.3.0
NPM Version: 7.0.14
Use $(pwd)
instead of $INIT_CWD
I set the height to 1000 and the window size is now constant rather than form-fitting for git and ssh. It does form-fit for fig.
macOS | Fig | Shell |
---|---|---|
10.16.0 | Version 1.0.40 (B188) | /bin/zsh |
fig diagnostic
Version 1.0.40 (B188) UserShell: /bin/zsh Bundle path: /Applications/Fig.app Autocomplete: true Settings.json: true CLI installed: true CLI tool path: /Users/carlowan/.fig/bin/fig Accessibility: true Number of specs: 77 SSH Integration: true Tmux Integration: true Keybindings path: /Users/carlowan/.fig/user/keybindings iTerm Integration: true Hyper Integration: false VSCode Integration: true Docker Integration: false Symlinked dotfiles: false Only insert on tab: false Installation Script: true PseudoTerminal Path: SecureKeyboardInput: false SecureKeyboardProcess: Current active process: /bin/zsh (96635) - ttys001 Current working directory: /Users/carlowan Current window identifier: 36075/1C2C1D59C-338A-42CB-B136-F3FCF145C696% (com.googlecode.iterm2)
sed
https://www.gnu.org/software/sed/manual/sed.html
What are the most used commands or workflows in that CLI tool (for you)?
Generally just text management and formatting! I use Obsidian for my notes, so all of my work is in text files and I would love an easier way to write commands for sed!
I was working with bundler and git. I wanted to git revert changes to our Gemfile. I kept tab completing to get to the file, but when I was done, the filename changed from Gemfile to gemfile and I would have to go back and manually fix it on my own.
What completion spec does this enhancement refer to? Or is it Fig itself?
subcommands
Aliases from files such as .gitconfig are shown at the bottom of suggested autocompletes until used and then they are only shown as recently used. These commands should take priority over default commands.
Ex: git st
should take priority over git stash
git st
would be shown as the first suggested command over git stash
as well as any other applicable subcommands that have aliases
git stash
is suggested first unles git st
was recently used
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.