Skip to content

Commit

Permalink
leverage Fig's shell parser, add git spec (#240001)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Imms <[email protected]>
Co-authored-by: Daniel Imms <[email protected]>
  • Loading branch information
3 people authored Feb 8, 2025
1 parent 18a64b3 commit 6dbde2a
Show file tree
Hide file tree
Showing 42 changed files with 19,420 additions and 1,447 deletions.
3 changes: 2 additions & 1 deletion .eslint-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
**/extensions/markdown-math/notebook-out/**
**/extensions/notebook-renderers/renderer-out/index.js
**/extensions/simple-browser/media/index.js
**/extensions/terminal-suggest/src/completions/**
**/extensions/terminal-suggest/src/completions/upstream/**
**/extensions/terminal-suggest/third_party/**
**/extensions/typescript-language-features/test-workspace/**
**/extensions/typescript-language-features/extension.webpack.config.js
**/extensions/typescript-language-features/extension-browser.webpack.config.js
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

0 comments on commit 6dbde2a

Please sign in to comment.