mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 11:55:55 +02:00
refactor: tree-sitter-nu friendly alternative expressions (#15301)
# Description Choose more tree-sitter-nu-friendly (if not better) expressions in nu scripts. The changes made in this PR all come from known issues of `tree-sitter-nu`. 1. nested single/double quotes: https://github.com/nushell/tree-sitter-nu/issues/125 2. module path of `use` command: https://github.com/nushell/tree-sitter-nu/issues/165 3. where predicates of boolean column: https://github.com/nushell/tree-sitter-nu/issues/177 4. `error make` keyword: https://github.com/nushell/tree-sitter-nu/issues/179 Those issues are either hard to fix or "not planned" for syntactical precision considerations ATM. # User-Facing Changes Should be none # Tests + Formatting # After Submitting
This commit is contained in:
@ -19,14 +19,14 @@ let exe = $paths.1
|
||||
|
||||
let test_lines = [
|
||||
"python -c 'import sys; print(sys.executable)'" # 1
|
||||
"python -c 'import os; import sys; v = os.environ.get("VIRTUAL_ENV"); print(v)'" # 2
|
||||
`python -c 'import os; import sys; v = os.environ.get("VIRTUAL_ENV"); print(v)'` # 2
|
||||
$"overlay use '([$env.PWD $env_name $subdir activate.nu] | path join)'"
|
||||
"python -c 'import sys; print(sys.executable)'" # 3
|
||||
"python -c 'import os; import sys; v = os.environ.get("VIRTUAL_ENV"); print(v)'" # 4
|
||||
`python -c 'import os; import sys; v = os.environ.get("VIRTUAL_ENV"); print(v)'` # 4
|
||||
"print $env.VIRTUAL_ENV_PROMPT" # 5
|
||||
"deactivate"
|
||||
"python -c 'import sys; print(sys.executable)'" # 6
|
||||
"python -c 'import os; import sys; v = os.environ.get("VIRTUAL_ENV"); print(v)'" # 7
|
||||
`python -c 'import os; import sys; v = os.environ.get("VIRTUAL_ENV"); print(v)'` # 7
|
||||
]
|
||||
|
||||
def main [] {
|
||||
|
Reference in New Issue
Block a user