nushell: A hang occurs when typing `source /dev/stdin`

Describe the bug Nushel hangs when trying to type source /dev/stdin.

To Reproduce

  1. Open Nushell
  2. Try to type source /dev/stdin
  3. It hangs when pressing the last <kbd>N</kbd> key and the letter n is not displayed

Expected behavior It should not hang.

Screenshots image

Configuration (please complete the following information):

Run version | pivot and paste the output to show OS, features, etc.

> version | pivot
  #        Column0                                               Column1
────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  0   version              0.33.0
  1   build_os             linux-x86_64
  2   rust_version         rustc 1.53.0
  3   cargo_version        cargo 1.53.0
  4   pkg_version          0.33.0
  5   build_time           2021-07-20 18:48:12
  6   build_rust_channel   release
  7   features             clipboard-cli, ctrlc, default, ptree, rustyline, term, trash, uuid, which, zip
  8   installed_plugins    binaryview, chart bar, chart line, fetch, from bson, from sqlite, inc, match, post,
                           ps, query json, s3, selector, start, sys, textview, to bson, to sqlite, tree, xpath

Add any other context about the problem here.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 2
  • Comments: 20 (9 by maintainers)

Most upvoted comments

I believe it’s nushell trying to parse, not only the command line, but the files your typing on the command line, as you’re typing. i could be wrong though.

I just run into an issue that looks similar but unrelated to dev/stdin.

For me it happens when I target the file ~/.cargo/bin/nu_plugin_net like

register ~/.cargo/bin/nu_plugin_net

It hangs when I type the last character (t) and the character is not shown anymore.
When I start with

~/.cargo/bin/nu_plugin_net

and try to prepend it with register it hangs when I enter the r

It also hangs with

nu -c "register ~/.cargo/bin/nu_plugin_net"

but in this case <kbd>Ctrl</kbd>+<kbd>c</kbd> ends the command and I get the cursor back.

Most other plugins don’t cause this issue (nu_plugin_query, nu_plugin_gstat, nu_plugin_plist, nu_plugin_plot). register nu_plugin_from_parquet also hangs though.

Same behavior in Kitty and Gnome Terminal

 version              0.74.0                                          
 branch                                                               
 commit_hash                                                          
 build_os             linux-x86_64                                    
 build_target         x86_64-unknown-linux-gnu                        
 rust_version         rustc 1.68.0-nightly (4781233a7 2023-01-16)     
 rust_channel         nightly-x86_64-unknown-linux-gnu                
 cargo_version        cargo 1.68.0-nightly (1cd6d3803 2023-01-12)     
 pkg_version          0.74.0                                          
 build_time           2023-01-17 18:41:35 +01:00                      
 build_rust_channel   release                                         
 features             database, dataframe, default, trash, which, zip 
 installed_plugins    gstat, query, query json, query web, query xml