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

List of commands that don't work here #18

Open
jzaefferer opened this issue Jul 18, 2020 · 2 comments
Open

List of commands that don't work here #18

jzaefferer opened this issue Jul 18, 2020 · 2 comments
Assignees

Comments

@jzaefferer
Copy link
Collaborator

jzaefferer commented Jul 18, 2020

alias: alias say-hi [] { echo 'Hello!' }; say-hi => error: Failed to spawn process

autoenv: might be possible to emulate with #3 or #34, but seems like overkill

cal, date: panicked at 'not implemented', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/time-0.1.43/src/sys.rs:101:9

cd, cp, du, enter, exit, mkdir, mv, pwd, rm, save, touch: depends on #34

clear is meaningless in the browser

config: not supported in wasm; not sure how useful this really is though

debug: not sure how this works, since all the examples are using FS. Simply running debug outputs �[38;5;10mnothing.

describe: similar to debug, it partially outputs ansi color codes, e.g. for echo '[{"name":"Bob","age":25},{"name":"Fred","age":35}]' | from json | describe it outputs this:
Screenshot 2020-07-18 at 11 27 26

empty?: not sure how to use this, since neither inline docs nor the website have examples (no docs for the command there at all)

fetch: 'failed to spawn'. We could make a custom implementation using the browser's fetch API.

history: error: Could not open history - maybe we can create that file with the vfs and update it with each command that the user runs?

kill: not supported in wasm; could emulate processes as web workers, list them with ps and kill them.

lines: the example shells out to native echo (^echo "two\nlines" | lines), which doesn't work here. I'm not sure how else to use lines

n/p: next, previous shell, doesn't do anything, not even output an error, though that also applies for the CLI. Help text doesn't explain how to use these.

random bool: needs a custom implementation like random dice

run_external: this looks like it makes no sense in this context, and should show a proper error message. Currently run_external echo gives back Failed to spawn process.

shells: This actually works, but without other shell-related commands, its difficult to test properly.

shuffle: fails badly (#12), probably same issue as with random bool.

split-by: no example, no markdown docs, and based on the description I have no idea how to use this

table: I'm not sure what this actually does, since, for example, sys and sys | table seem to do the same thing. Though here it breaks badly (#12)

with-env: error: operation not supported on wasm yet

@jzaefferer jzaefferer self-assigned this Jul 19, 2020
@sophiajt
Copy link
Member

I wonder if we can fix the alias one to work. Looks like the alias isn't set at the end of ; but we could think about making that possible:

20/07/2020 06:10:24> alias say-hi [] { echo 'Hello!' }; say-hi
error: Command not found
  ┌─ shell:1:36
  │
1 │ alias say-hi [] { echo 'Hello!' }; say-hi
  │                                    ^^^^^^ command not found

@nushell nushell deleted a comment from fdncred Jul 25, 2020
@nushell nushell deleted a comment from fdncred Jul 25, 2020
@nushell nushell deleted a comment from fdncred Jul 25, 2020
@jzaefferer
Copy link
Collaborator Author

jzaefferer commented Jul 25, 2020

@fdncred @jonathandturner I've finished the list! Overall looking pretty good.

I would appreciate some help with #12.

PS: I deleted the now-irrelevant comments about ansi and `char.

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

No branches or pull requests

2 participants