Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leverage Fig's shell parser, add git spec #240001

Merged
merged 55 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
90aea63
add fig modules
meganrogge Feb 4, 2025
1b39277
change tsconfig
meganrogge Feb 4, 2025
8fe5382
fix errors
meganrogge Feb 4, 2025
0559925
add log statement
meganrogge Feb 4, 2025
5c975e3
eslint, filters
meganrogge Feb 4, 2025
db01139
push current status
meganrogge Feb 5, 2025
5dbd5b9
fix things so there are no errors
meganrogge Feb 5, 2025
bd57978
get arg parsing to work
meganrogge Feb 5, 2025
446563d
Merge remote-tracking branch 'origin/main' into merogge/fig-project
Tyriar Feb 6, 2025
42d7d0b
Add tests for shell-parser
Tyriar Feb 6, 2025
a730d35
Add readme explaining fork and cgmanifest
Tyriar Feb 6, 2025
9e603c8
Add upstream tests for shell-parser
Tyriar Feb 6, 2025
cf7a01d
Remove additional src dir in forked fig packages
Tyriar Feb 6, 2025
988c880
Add fig/shared/ unit tests
Tyriar Feb 6, 2025
5a041bb
Remove unneeded files/content, move chmanifest to ext root
Tyriar Feb 6, 2025
6aaeebf
Tweak folder names, rewrite require to import
Tyriar Feb 6, 2025
2172c4e
Pass in code spec
Tyriar Feb 6, 2025
b997cfb
get parsing to work for options/args
meganrogge Feb 6, 2025
6b8ccd0
Refactor
meganrogge Feb 6, 2025
1725186
add git for testing purposes
meganrogge Feb 6, 2025
cf2bc27
get files and folders working
meganrogge Feb 7, 2025
6843b47
clean up
meganrogge Feb 7, 2025
cc565ce
pass things into the tests
meganrogge Feb 7, 2025
7bc14cc
Merge remote-tracking branch 'origin/main' into merogge/fig-project
Tyriar Feb 7, 2025
89b7e72
Use SuggestionFlag bitfield correctly
Tyriar Feb 7, 2025
79f1714
Pull completions off Record
Tyriar Feb 7, 2025
9cd7ed9
Get basic generator working
Tyriar Feb 7, 2025
c791830
get tests passing
meganrogge Feb 7, 2025
f147f9c
clean up
meganrogge Feb 7, 2025
0669253
more cleanup
meganrogge Feb 7, 2025
c9f3939
rm comment
meganrogge Feb 7, 2025
29bfeb8
rm comment
meganrogge Feb 7, 2025
f00785d
push git tests, some failing
meganrogge Feb 7, 2025
ede4548
comment out tests
meganrogge Feb 7, 2025
f5fc887
comment more out
meganrogge Feb 7, 2025
888ee36
rm from filters
meganrogge Feb 7, 2025
bc9ab2a
use as upstream
meganrogge Feb 7, 2025
d270b0d
add helper
meganrogge Feb 7, 2025
d061169
better name
meganrogge Feb 7, 2025
3f40fb8
clean up
meganrogge Feb 7, 2025
8711eb1
rm ?
meganrogge Feb 7, 2025
7bf25b7
rm a bunch of code
meganrogge Feb 7, 2025
6ecffed
Remove user aliases from test expectations
Tyriar Feb 7, 2025
7d42085
Align tsconfig with typescript exts
Tyriar Feb 7, 2025
86d236e
Rm maybe unneeded file
meganrogge Feb 8, 2025
7847db0
Merge branch 'main' into merogge/fig-project
Tyriar Feb 8, 2025
648516c
Remove test/ usage in src/
Tyriar Feb 8, 2025
ddef564
Tweak eslint/filter exceptions
Tyriar Feb 8, 2025
4edfcb6
Add ms copyright
Tyriar Feb 8, 2025
f731376
Use single quotes in src/fig/
Tyriar Feb 8, 2025
3143abf
Normalize new lines when using test fixtures
Tyriar Feb 8, 2025
04f871d
Comment out git test that can fail depending on .gitconfig
Tyriar Feb 8, 2025
6f99a52
Add comments to edit lines to index.d.ts
Tyriar Feb 8, 2025
46657dd
Merge branch 'main' into merogge/fig-project
Tyriar Feb 8, 2025
1383bbe
add a line
meganrogge Feb 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslint-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
**/extensions/html-language-features/server/src/test/pathCompletionFixtures/**
**/extensions/ipynb/notebook-out/**
**/extensions/markdown-language-features/media/**
**/extensions/terminal-suggest/src/fig/**
**/extensions/terminal-suggest/src/completions/**
**/extensions/markdown-language-features/notebook-out/**
**/extensions/markdown-math/notebook-out/**
**/extensions/notebook-renderers/renderer-out/index.js
Expand Down
5 changes: 5 additions & 0 deletions build/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ module.exports.unicodeFilter = [
'!extensions/notebook-renderers/renderer-out/**',
'!extensions/php-language-features/src/features/phpGlobalFunctions.ts',
'!extensions/terminal-suggest/src/completions/upstream/**',
'!extensions/terminal-suggest/src/fig/**',
'!extensions/typescript-language-features/test-workspace/**',
'!extensions/vscode-api-tests/testWorkspace/**',
'!extensions/vscode-api-tests/testWorkspace2/**',
Expand Down Expand Up @@ -90,6 +91,7 @@ module.exports.indentationFilter = [
'!test/monaco/out/**',
'!test/smoke/out/**',
'!extensions/terminal-suggest/src/completions/upstream/**',
'!extensions/terminal-suggest/src/fig/**',
'!extensions/typescript-language-features/test-workspace/**',
'!extensions/typescript-language-features/resources/walkthroughs/**',
'!extensions/typescript-language-features/package-manager/node-maintainer/**',
Expand Down Expand Up @@ -173,6 +175,7 @@ module.exports.copyrightFilter = [
'!extensions/ipynb/notebook-out/**',
'!extensions/simple-browser/media/codicon.css',
'!extensions/terminal-suggest/src/completions/upstream/**',
'!extensions/terminal-suggest/src/fig/**',
'!extensions/typescript-language-features/node-maintainer/**',
'!extensions/html-language-features/server/src/modes/typescript/*',
'!extensions/*/server/bin/*',
Expand All @@ -191,6 +194,7 @@ module.exports.tsFormattingFilter = [
'!extensions/**/colorize-fixtures/**',
'!extensions/vscode-api-tests/testWorkspace/**',
'!extensions/vscode-api-tests/testWorkspace2/**',
'!extensions/terminal-suggest/src/fig/**',
'!extensions/**/*.test.ts',
'!extensions/html-language-features/server/lib/jquery.d.ts',
];
Expand All @@ -200,6 +204,7 @@ module.exports.eslintFilter = [
'**/*.cjs',
'**/*.mjs',
'**/*.ts',
'!extensions/terminal-suggest/src/fig/**',
...readFileSync(join(__dirname, '..', '.eslint-ignore'))
.toString()
.split(/\r\n|\n/)
Expand Down
71 changes: 70 additions & 1 deletion extensions/terminal-suggest/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,75 @@
"url": "https://github.com/withfig/autocomplete/blob/main/LICENSE.md"
},
"description": "IDE-style autocomplete for your existing terminal & shell from withfig/autocomplete."
},
{
"component": {
"type": "git",
"git": {
"name": "amazon-q-developer-cli",
"repositoryUrl": "https://github.com/aws/amazon-q-developer-cli",
"commitHash": "f66e0b0e917ab185eef528dc36eca56b78ca8b5d"
}
},
"licenseDetail": [
"MIT License",
"",
"Copyright (c) 2024 Amazon.com, Inc. or its affiliates.",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all",
"copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
"SOFTWARE."
],
"version": "f66e0b0e917ab185eef528dc36eca56b78ca8b5d"
},
{
"component": {
"type": "git",
"git": {
"name": "@fig/autocomplete-shared",
"repositoryUrl": "https://github.com/withfig/autocomplete-tools/blob/main/shared",
"commitHash": "104377c19a91ca8a312cb38c115a74468f6227cb"
}
},
"licenseDetail": [
"MIT License",
"",
"Copyright (c) 2021 Hercules Labs Inc. (Fig)",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all",
"copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
"SOFTWARE."
],
"version": "1.1.2"
}
]
],
"version": 1
}
29 changes: 29 additions & 0 deletions extensions/terminal-suggest/fixtures/shell-parser/basic/input.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
### Case 1
a b\\ c

### Case 2
a "b"

### Case 3
a 'b'

### Case 4
a $'b'

### Case 5
a $commit

### Case 6
a $$

### Case 7
a $((b))

### Case 8
a $(b)

### Case 9
a \`b\`

### Case 10
a $(\`b\`)
Loading
Loading