mirror of
https://github.com/benapetr/stikkit.git
synced 2025-04-25 20:41:20 -05:00
no extras
This commit is contained in:
parent
7309ccb185
commit
1f35bb9cb6
@ -27,6 +27,7 @@ string Configuration::Author = "";
|
||||
string Configuration::Version = "1.0.4";
|
||||
string Configuration::Title = "";
|
||||
string Configuration::Home = "";
|
||||
bool Configuration::NoExtras = false;
|
||||
string Configuration::Input = "";
|
||||
string Configuration::DefaultURL = "";
|
||||
|
||||
|
@ -33,6 +33,7 @@ namespace Stikkit
|
||||
static string DefaultURL;
|
||||
static bool Private;
|
||||
static string Home;
|
||||
static bool NoExtras;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,10 @@ int main(int argc, char *argv[])
|
||||
cerr << "curl_easy_perform() failed: " << curl_easy_strerror(res) << endl;
|
||||
return 12;
|
||||
}
|
||||
cout << "Successfully pastebined to: " << readBuffer;
|
||||
if (!Stikkit::Configuration::NoExtras)
|
||||
cout << "Successfully pastebined to: " << readBuffer;
|
||||
else
|
||||
cout << readBuffer;
|
||||
curl_easy_cleanup(curl);
|
||||
} else
|
||||
{
|
||||
|
@ -131,6 +131,9 @@ bool TerminalParser::ParseChar(char x)
|
||||
case 'p':
|
||||
Configuration::Private = true;
|
||||
return false;
|
||||
case 's':
|
||||
Configuration::NoExtras = true;
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -149,6 +152,7 @@ void TerminalParser::DisplayHelp()
|
||||
" -v: Increases verbosity\n"\
|
||||
" -t <title>: Set a title for a paste\n"\
|
||||
" -p: Mark a paste as private (not visible in recent pastes)\n"\
|
||||
" -s: Display only RAW url of paste and no extra text\n"\
|
||||
" -e <minutes>: Set expiry in minutes, parameter needs to be a number\n"\
|
||||
" --version: Display a version\n"\
|
||||
" -h | --help: Display this help\n\n"\
|
||||
|
Loading…
x
Reference in New Issue
Block a user