withfig / autocomplete

IDE-style autocomplete for your existing terminal & shell
https://fig.io
MIT License
24.54k stars 5.46k forks source link

[dig] dig autocomplete inserts escape characters #1240

Open jordi-adame opened 2 years ago

jordi-adame commented 2 years ago

Description:

dig autocomplete inserts +nocomments\ +noquestion\ +noauthority\ +noadditional\ +nostats instead of +nocomments +noquestion +noauthority +noadditional +nostats

https://user-images.githubusercontent.com/1081448/169666464-ecf9ba6c-86f2-4117-a894-e3638318070c.mov

Details:

macOS Fig Shell
12.3.1 Version 1.0.57 (B450) /bin/zsh
fig diagnostic

Version 1.0.57 (B450) [U.S. International – PC] 
UserShell: /bin/zsh
Bundle path: /Applications/Fig.app
Autocomplete: true
Settings.json: true
CLI installed: true
CLI tool path: /Users/jordi/.fig/bin/fig
Accessibility: true
SSH Integration: false
Tmux Integration: false
iTerm Integration: true [Authenticated]
Hyper Integration: false
VSCode Integration: true
Docker Integration: false
Symlinked dotfiles: false
Only insert on tab: false
UNIX Socket Exists: true
Installation Script: true
PseudoTerminal Path: /usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Users/jordi/.fig/bin
SecureKeyboardInput: false
SecureKeyboardProcess: 
Current active process: zsh (72268) - /dev/ttys007
Current terminal session: w0t2p0:264A1C4E-5230-4AC4-AAA7-C656F5596CAC
Current working directory: /Users/jordi/src/meetsy/api
Current window identifier: 1343/% (com.googlecode.iterm2)

clo4 commented 2 years ago

Hmm, this is more of an issue for https://github.com/withfig/autocomplete since it's an issue with a particular completion spec, will move it there.

Should be a simple fix if you want to contribute! From these lines you can duplicate the name property and rename it to insertValue.

It's inserting the escapes because it thinks there's a subcommand called that, where the exact token must be +nocomments +noquestion +noauthority +noadditional +nostats.

(May also be more appropriate to move to additionalSuggestions - play around with it and we'll decide in the PR 😄 )

jordi-adame commented 2 years ago

@SeparateRecords I'll take a stab at it later this weekend