Skip to content

Make to and toEnd chainable#276

Merged
ariporad merged 1 commit intoshelljs:masterfrom
TimothyGu:to
Jan 25, 2016
Merged

Make to and toEnd chainable#276
ariporad merged 1 commit intoshelljs:masterfrom
TimothyGu:to

Conversation

@TimothyGu
Copy link
Copy Markdown
Contributor

No description provided.

@nfischer
Copy link
Copy Markdown
Member

nfischer commented Jan 9, 2016

This seems like a cool potential feature. Is this possible to emulate in Bash though?

@ariporad
Copy link
Copy Markdown
Contributor

@nfischer: Apparently (TIL!):

$ echo "Apparently this works\!" > foo > bar > baz
$ echo foo
Apparently this works!
$ echo bar
Apparently this works!
$ echo baz
Apparently this works!

Screenshot

@ariporad
Copy link
Copy Markdown
Contributor

@TimothyGu: Two things:

  1. Could you please squash your commits? Thanks!
  2. Other than that, LGTM!

src/to.js Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would return this; also work? I'm refactoring the ShellString type with the intention that only strings created with common.ShellString will have the .to() and .toEnd() types. This is so that we can avoid modifying the String prototype.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should.

@nfischer
Copy link
Copy Markdown
Member

I just have one comment that should be addressed before merging

@TimothyGu
Copy link
Copy Markdown
Contributor Author

@nfischer @ariporad both comments addressed. Sorry, the comment 16 days ago got lost in my inbox…

@nfischer
Copy link
Copy Markdown
Member

LGTM once this passes tests

ariporad added a commit that referenced this pull request Jan 25, 2016
feat(end/round): make to and toEnd chainable
@ariporad ariporad merged commit 49b60cd into shelljs:master Jan 25, 2016
@ariporad
Copy link
Copy Markdown
Contributor

Merged! Thanks @TimothyGu

@TimothyGu TimothyGu deleted the to branch January 25, 2016 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants