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

Fix: test case update #163

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Fix: test case update #163

merged 2 commits into from
Nov 29, 2024

Conversation

blindFS
Copy link
Contributor

@blindFS blindFS commented Nov 29, 2024

I was too slow on the thread of #161 , some necessary updates is not pushed on-time.

  1. commands start with overlay and export are removed, they are treated as keywords
  2. one test case with cargo install updated

@blindFS
Copy link
Contributor Author

blindFS commented Nov 29, 2024

@fdncred command list moved outside of grammar.js into internal.txt.

steps to update the list:

  1. run your script (remember to exclude those starts-with 'export' or 'overlay')
  2. save the result to internal.txt
  3. run tree-sitter generate to update the grammar

@fdncred
Copy link
Collaborator

fdncred commented Nov 29, 2024

I was too slow on

LOL. Sorry, like to pull the trigger fast.

Are overlay and export still identified and highlighted correctly when they have spaces in the command names?

@blindFS
Copy link
Contributor Author

blindFS commented Nov 29, 2024

I was too slow on

LOL. Sorry, like to pull the trigger fast.

Are overlay and export still identified and highlighted correctly when they have spaces in the command names?

image

I think so, there're rules specified for them in highlights.scm.

(overlay_list "list" @keyword.storage.modifier)
(overlay_hide "hide" @keyword.storage.modifier)
(overlay_new "new" @keyword.storage.modifier)
(overlay_use
    "use" @keyword.storage.modifier
    "as" @keyword
)

@fdncred
Copy link
Collaborator

fdncred commented Nov 29, 2024

Just to document my command somewhere, here it is.

help commands |
   where command_type == built-in or command_type == plugin or command_type == keyword or command_type == external |
   where name not-like overlay and name not-like export | get name |
   where {' ' in $in} | save -f internal.txt

I really don't like having multiple where's but it's easier to read this way

@fdncred fdncred merged commit 41a1c57 into nushell:main Nov 29, 2024
3 checks passed
@fdncred
Copy link
Collaborator

fdncred commented Nov 29, 2024

Thanks

@blindFS
Copy link
Contributor Author

blindFS commented Nov 29, 2024

Just to document my command somewhere, here it is.

help commands |
   where command_type == built-in or command_type == plugin or command_type == keyword or command_type == external |
   where name not-like overlay and name not-like export | get name |
   where {' ' in $in} | each {|r| $'"($r)"'} | save -f internal.txt

I really don't like having multiple where's but it's easier to read this way

each {|r| $'"($r)"'} this should be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants