question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't store strings that begin with -

See original GitHub issue

When you try to store a value that begins with a - program does not execute as expected.

python --version: Python 2.7.11 uname -a: Darwin ip-192-168-128-62.ec2.internal 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64

credstash put a.b.c "-Putanythinginherethatstartswitha-" usage: credstash put [-h] [-k KEY] [-v VERSION] [-a] credential value [context [context ...]] credstash put: error: too few arguments

Please advise.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
ghostcommented, Nov 1, 2016

This is not a big issue, you need simply use a double dash (–) like this :

credstash put -- a.b.c -Putanythinginherethatstartswitha-
0reactions
bo01eancommented, Oct 13, 2017

correct, |, not --.

I am going to close this, as there is few workarounds. Just have to use – if you don’t want extra newlines.

Not sure if a new issue for the extra newline on pipe is needed 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the easiest way to get all strings that do not start with a ...
Use generator expressions, the best way I think. for line in (line for line in x if not line.startswith('?')): DO_STUFF. Or your way:...
Read more >
Python Strings | Python Education - Google Developers
Python has a built-in string class named "str" with many handy features (there is an older module named "string" which you should not...
Read more >
Strings and Character Data in Python
In this tutorial you'll learn how to use Python's rich set of operators, functions, and methods for working with strings. You'll learn how...
Read more >
Useful string methods - Learn web development | MDN
Making new strings from old parts · Extract the three-letter station code and store it in a new variable. · Find the character...
Read more >
Strings - Ignition User Manual 7.9
Strings in Python are actually indexed, with the first character having an index of 0. To grab a value at a specific index,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found