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

Pipe example from 'Readme' doesn't work #406

Closed
hjek opened this issue Mar 23, 2016 · 3 comments
Closed

Pipe example from 'Readme' doesn't work #406

hjek opened this issue Mar 23, 2016 · 3 comments
Assignees
Labels
blocked docs invalid question Question from a user (which may not require code/documentation changes to the project)

Comments

@hjek
Copy link

hjek commented Mar 23, 2016

$ cat pipe.js 
require('shelljs/global')
echo('files with o\'s in the name:\n' + ls().grep('o'));

$ shjs pipe.js 
/home/pelle/pipe.js:3
echo('files with o\'s in the name:\n' + ls().grep('o'));
                                             ^
TypeError: ls(...).grep is not a function
    at Object.<anonymous> (/home/pelle/pipe.js:3:46)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:141:18)
    at node.js:933:3
@ariporad
Copy link
Contributor

Hi @hjek!

I think the problem is most likely that you're using shelljs 0.6 (which is currently on npm), where as the README on master is the development version, which is 0.7. Can you confirm that this is the case?

Thanks!

@ariporad ariporad added docs blocked question Question from a user (which may not require code/documentation changes to the project) labels Mar 23, 2016
@ariporad ariporad self-assigned this Mar 23, 2016
@hjek
Copy link
Author

hjek commented Mar 23, 2016

That was the problem, and the documentation on there also doesn't mention pipes.

@hjek hjek closed this as completed Mar 23, 2016
@nfischer
Copy link
Member

The README is still the best place to check for docs, but it documents all the new features that may or may not be released yet. I'll add a warning to the top of the README to clarify this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked docs invalid question Question from a user (which may not require code/documentation changes to the project)
Projects
None yet
Development

No branches or pull requests

3 participants