Skip to content

Work in progress: pushd/popd/dirs#47

Merged
arturadib merged 11 commits intoshelljs:masterfrom
mstade:pushd-popd-dirs
Dec 31, 2012
Merged

Work in progress: pushd/popd/dirs#47
arturadib merged 11 commits intoshelljs:masterfrom
mstade:pushd-popd-dirs

Conversation

@mstade
Copy link
Copy Markdown
Contributor

@mstade mstade commented Dec 25, 2012

I started work on #24. Currently, pretty much just started looking at pushd and popd; dirs has the most basic implementation with no options supported currently. Tests are optimistic and too simple. Comments more than welcome!

shell.js Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

semi-colons for consistency with the current code :) thanks!

@arturadib
Copy link
Copy Markdown
Collaborator

hey Marcus! many thanks for your contributions.

I've left some comments but if you don't have time to address them, I'd be happy to - I just wanted to leave some bookmarks of places I'd need to revisit.

superb work, many thanks! let me know if you want me do handle the comments.

@mstade
Copy link
Copy Markdown
Contributor Author

mstade commented Dec 27, 2012

Excellent feedback, thanks! I figured I'd get some visibility on the work so I can get your direction so I'm in line with project conventions. As you can probably tell, I'm in the semicolons-meh camp, but I'm trying hard to adjust! ;o)

I'll try to get a couple of hours in on this tonight to fix the things you mention, as well as add the missing dirs functionality, or remove it from exports altogether as you suggest if I don't have time to get around to implementing it properly.

@mstade
Copy link
Copy Markdown
Contributor Author

mstade commented Dec 27, 2012

I've changed the return values to be an array representing the stack now. Should the commands also log the stack when invoked, like their shell counterparts do? Currently they only log errors (by invoking error().)

Added pwd check to all tests, and added a test for invalid use of
popd. More tests to come.
@arturadib
Copy link
Copy Markdown
Collaborator

thanks Marcus - ready to merge, unless you're still working on the tests

@mstade
Copy link
Copy Markdown
Contributor Author

mstade commented Dec 27, 2012

Some more tests wouldn't hurt I think. I still need to make sure the options have tests as well as invalid usage (e.g. pushd("/some/invalid/dir") should fail.) Feel free to merge if you'd like. In that case I'll just make another pull request with the added tests later – your call!

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.

2 participants