Skip to content

feat(set): add new set() command#329

Merged
nfischer merged 1 commit intomasterfrom
feat-set-command
Feb 1, 2016
Merged

feat(set): add new set() command#329
nfischer merged 1 commit intomasterfrom
feat-set-command

Conversation

@nfischer
Copy link
Copy Markdown
Member

@nfischer nfischer commented Feb 1, 2016

Add new set() command as a wrapper for config variables. This takes the -e, -v, +e, and +v flags.

This is based off (and replaces) #149, which introduced the logCmd option. This also adds set() as a nice wrapper for interfacing with the variables.

config.verbose will log each command in a unix-y kind of format. For example, ls('dir/') logs as ls dir/ (strips parens, strips surrounding quotes). This is mostly just because it was easier to implement this way.

I left the docs for config.fatal (and added docs for config.verbose), although we might also consider deprecating those and encouraging the use of the equivalent set() commands instead (to trim down on documentation). One issue is that config.silent does not have an analogous set option.

This also fixes a formatting error in touch.js's comment block.

@nfischer nfischer added feature low priority bash compat Compatibility issues with bash or POSIX behavior labels Feb 1, 2016
src/set.js Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not just always prepend '-' here, and register th

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, I can edit it to do that. I still need to get the negate boolean anyway.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@nfischer: No, I realized that what I meant wouldn't work. Never mind.

Add new set() command as a wrapper for `config` variables. This takes the `-e`,
`-v`, `+e`, and `+v` flags.
@nfischer
Copy link
Copy Markdown
Member Author

nfischer commented Feb 1, 2016

@ariporad this should be ready

@ariporad
Copy link
Copy Markdown
Contributor

ariporad commented Feb 1, 2016 via email

@nfischer
Copy link
Copy Markdown
Member Author

nfischer commented Feb 1, 2016

I'll merge once CI passes

nfischer added a commit that referenced this pull request Feb 1, 2016
feat(set): add new set() command
@nfischer nfischer merged commit f729896 into master Feb 1, 2016
@nfischer nfischer deleted the feat-set-command branch February 16, 2016 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash compat Compatibility issues with bash or POSIX behavior feature low priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants