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: remove mentions to old and deprecated && and || logic operators #802

Merged
merged 1 commit into from
Feb 28, 2023
Merged

FIX: remove mentions to old and deprecated && and || logic operators #802

merged 1 commit into from
Feb 28, 2023

Conversation

amtoine
Copy link
Member

@amtoine amtoine commented Feb 28, 2023

hello there 👋 😋

i did notice, in the installation page, that there were remaining mentions to the old and deprecated && and || operators

Note
this is what we get now

>_ true && true
Error: nu::parser::shell_andand

  × The '&&' operator is not supported in Nushell
   ╭─[entry #12:1:1]
 1 │ true && true
   ·      ─┬
   ·       ╰── instead of '&&', use ';' or 'and'
   ╰────
  help: use ';' instead of the shell '&&', or 'and' instead of the boolean
        '&&'

and

>_ false || true
Error: nu::parser::shell_oror

  × The '||' operator is not supported in Nushell
   ╭─[entry #13:1:1]
 1 │ false || true
   ·       ─┬
   ·        ╰── instead of '||', use 'try' or 'or'
   ╰────
  help: use 'try' instead of the shell '||', or 'or' instead of the boolean
        '||'

and the output of help operators does not contain them anymore

this PR removes the old && and || or replaces them by and and or when possible

the changes

i've used rg '&&' and rg '\|\|' to track the files with bad operators

  • only focused on the book => it is ok to keep these bad operators in the old blog post

i hope i did not miss any of them and i did not edit things that were ok 😌

disclaimer

i've got the following pending change i do not know what to do with, i'm not fluent enough in any of these languages to know if the && and || are legit or not 👀

diff --git a/de/book/mathematik.md b/de/book/mathematik.md
index 37b9b121c1..c54396db01 100644
--- a/de/book/mathematik.md
+++ b/de/book/mathematik.md
@@ -56,7 +56,7 @@ Die folgenden Vergleichsoperatoren sind ebenfalls verfügbar:
 
 ## Verknüpfungsoperatoren
 
-Nushell unterstützt auch die Operatoren `&&` ("und") und `||` ("oder") um zwei Operationen die Bool-Werte zurückgeben zu verbinden. Zum Beispiel: `ls | where name in ["one" "two" "three"] && size > 10kb`
+Nushell unterstützt auch die Operatoren `and` ("und") und `or` ("oder") um zwei Operationen die Bool-Werte zurückgeben zu verbinden. Zum Beispiel: `ls | where name in ["one" "two" "three"] and size > 10kb`
 
 ## Reihenfolge von Operationen
 
diff --git a/es/book/matematicas.md b/es/book/matematicas.md
index fdbe6e4097..0e08a01ac2 100644
--- a/es/book/matematicas.md
+++ b/es/book/matematicas.md
@@ -56,7 +56,7 @@ Los siguientes comparadores también se encuentran disponibles:
 
 ## Operadores Compuestos
 
-Nushell también soporta `&&` y `||` para unir dos operaciones que regresen valores booleanos, usando `y` y `o` respectivamente. Por ejemplo: `ls | where name in ["uno" "dos" "tres"] && size > 10kb`
+Nushell también soporta `and` y `or` para unir dos operaciones que regresen valores booleanos, usando `y` y `o` respectivamente. Por ejemplo: `ls | where name in ["uno" "dos" "tres"] and size > 10kb`
 
 ## Orden de operaciones
 
diff --git a/ja/book/math.md b/ja/book/math.md
index 1db1c656e6..80a4ecdf01 100644
--- a/ja/book/math.md
+++ b/ja/book/math.md
@@ -58,4 +58,4 @@ true
 
 ## 複合演算子
 
-`&&`と`||`を使ってブーリアンを返す2つの操作を結合できます。例えば: `ls | where name in ["one" "two" "three"] && size > 10kb`
+`and`と`or`を使ってブーリアンを返す2つの操作を結合できます。例えば: `ls | where name in ["one" "two" "three"] and size > 10kb`

@amtoine amtoine closed this Feb 28, 2023
@amtoine amtoine reopened this Feb 28, 2023
@fdncred
Copy link
Collaborator

fdncred commented Feb 28, 2023

good catch. thanks!

@fdncred fdncred merged commit 8d72b5f into nushell:main Feb 28, 2023
@amtoine amtoine deleted the fix/and-and-is-not-a-valid-command-separator-anymore branch March 1, 2023 17:51
@amtoine
Copy link
Member Author

amtoine commented Mar 1, 2023

good catch. thanks!

anytime 😉

ayax79 pushed a commit to ayax79/nushell.github.io that referenced this pull request Jun 26, 2024
completions to `rye`
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.

None yet

2 participants