Skip to content

Commit

Permalink
Update tcl.json (#372)
Browse files Browse the repository at this point in the history
add missing $ for positional arguments
  • Loading branch information
surmish authored Sep 30, 2023
1 parent 396ba29 commit 0368bee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions snippets/tcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,17 +331,17 @@
},
"Search a list for an element": {
"prefix": "lsearch",
"body": "lsearch {1:?options?} \"${2:list}\" {${0:pattern}}",
"body": "lsearch ${1:?options?} \"${2:list}\" {${0:pattern}}",
"description": "This command searches the elements of list to see if one of them matches pattern. If so, the command returns the index of the first matching element (unless the options -all or -inline are specified.) If not, the command returns -1 or (if options -all or -inline are specified) the empty string."
},
"Change an element in a list": {
"prefix": "lset",
"body": ["lset {1:varName} ${2:?index ...?} {${3:newValue}}", "$0"],
"body": ["lset ${1:varName} ${2:?index ...?} {${3:newValue}}", "$0"],
"description": "The lset command accepts a parameter, varName, which it interprets as the name of a variable containing a Tcl list. It also accepts zero or more indices into the list. The indices may be presented either consecutively on the command line, or grouped in a Tcl list and presented as a single argument. Finally, it accepts a new value for an element of varName."
},
"Sort the elements of a list": {
"prefix": "lsort",
"body": "lsort {1:?options?} \"${0:list}\"",
"body": "lsort ${1:?options?} \"${0:list}\"",
"description": "This command sorts the elements of list, returning a new list in sorted order."
},
"Open a file-based or command pipeline channel": {
Expand Down

0 comments on commit 0368bee

Please sign in to comment.