Skip to content

spongessuck/pargos

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pargos

indices

string[] args = { "pull", "origin", "master" };
ArgumentCollection collection = ArgumentFactory.Parse(args);

collection.GetString(0); // pull
collection.GetString(1); // origin

collection.GetString(-1); // master
collection.GetString(-2); // origin

collection.GetString(5);  // null
collection.GetString(-5); // null

names

string[] args = { "config", "--global", "--add", "user.email", "me@example.com" };
ArgumentCollection collection = ArgumentFactory.Parse(args);

collection.GetString("add");    // user.email
collection.GetString("add", 1); // me@example.com

collection.GetString("new");    // null
collection.GetString("global"); // null
collection.GetString("add", 2); // null

existence

string[] args = { "config", "--global", "--add", "user.email", "me@example.com" };
ArgumentCollection collection = ArgumentFactory.Parse(args);

collection.Has(0); // true
collection.Has(1); // false

collection.Has("global");    // true
collection.Has("global", 0); // false

collection.Has("add", 1); // true
collection.Has("add", 2); // false

aggregation

string[] args = { "commit", "-am", "Great feature", "--amend", "--no-verify", "--no-post-rewrite" };
ArgumentCollection collection = ArgumentFactory.Parse(args);

collection.Any();   // true
collection.Count(); // 1

collection.Count("a"); // 0
collection.Count("m"); // 1

collection.Count("nothing"); // 0

scope

string[] args = { "commit", "-am", "Great feature", "--amend", "--no-verify", "--no-post-rewrite" };
ArgumentCollection collection = ArgumentFactory.Parse(args);

collection.Scope("no");               // --verify --post-rewrite
collection.Scope("no").Has("verify"); // true

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 94.7%
  • F# 4.2%
  • PowerShell 1.1%