Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Treat negative numbers and dashes as values #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eush77
Copy link

@eush77 eush77 commented Sep 21, 2014

Why is it a good idea?

  • - is a special argument across multiple Unix commands and usually stands for stdin (echo hello |cat - /another/file);
  • negative numbers are not usually expected to behave as options, but rather as values, this is also sort of a standard (echo -e 'hello\nworld' |head -1);
  • I doubt there exists a single program which defines an option with spaces in it.

This patch is a superset of #38.

@eush77 eush77 changed the title Treat negative numbers, dashes, and arguments with spaces as values Treat negative numbers and dashes as values Sep 24, 2014
@jpb
Copy link

jpb commented Dec 8, 2014

@eush77 what is the stats of this? I'm interested in using - to denote "read from stdin"

@eush77
Copy link
Author

eush77 commented Dec 8, 2014

I rebased and squashed my changes into a single commit.

@harthur Is it ready to merge?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants