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.

Option for disabling the "destructive command" prompt

See original GitHub issue

Description

I don’t see any option to disable the

You're about to run a destructive command.
Do you want to proceed? (y/n):

prompt in the config at ~/.config/pgcli/config.

I’d like to disable it cause I run these kinds of queries frequently and it’s a bit annoying.

Your environment

  • Please provide your OS and version information. Kubuntu 18.04.1
  • Please provide your CLI version. 1.10.3
  • What is the output of pip freeze command. appdirs==1.4.3 apt-xapian-index==0.47 arrow==0.10.0 asciinema==1.4.0 asn1crypto==0.23.0 astroid==1.6.0 attrs==17.3.0 autobahn==17.10.1 Automat==0.6.0 awscli==1.15.45 awslogs==0.10.0 babelfish==0.5.5 backports.csv==1.0.5 beautifulsoup4==4.6.0 binaryornot==0.4.4 boto3==1.7.45 botocore==1.10.45 cached-property==1.3.1 certifi==2017.11.5 cffi==1.11.2 chardet==3.0.4 cli-helpers==1.0.2 click==6.7 colorama==0.3.7 command-not-found==0.3 configobj==5.0.6 constantly==15.1.0 cookiecutter==1.6.0 credstash==1.14.0 cryptography==2.0.3 cupshelpers==1.0 decorator==4.2.1 distro-info==0.18 docker==3.3.0 docker-compose==1.21.2 docker-pycreds==0.3.0 dockerpty==0.4.1 docopt==0.6.2 docutils==0.14 dogpile.cache==0.6.4 entrypoints==0.2.3 enzyme==0.4.1 first==2.0.1 future==0.16.0 greenlet==0.4.12 guessit==2.1.4 hkdf==0.0.3 httpie==0.9.9 httplib2==0.9.2 humanize==0.5.1 hyperlink==17.3.1 idna==2.6 incremental==17.5.0 ipaddress==1.0.18 isort==4.2.15 jedi==0.11.0 Jinja2==2.10 jinja2-time==0.2.0 jmespath==0.9.3 jsonschema==2.6.0 keyring==13.2.1 keyrings.alt==3.0 lambda-uploader==1.2.0 language-selector==0.1 lazy-object-proxy==1.3.1 magic-wormhole==0.10.3 MarkupSafe==1.0 mccabe==0.6.1 meld==3.18.0 msgpack==0.5.6 neovim==0.2.6 networkx==2.1 olefile==0.45.1 parso==0.1.0 pbr==3.1.1 pexpect==4.2.1 pgcli==1.10.3 pgspecial==1.11.2 Pillow==5.1.0 pip-tools==2.0.2 pipenv==2018.7.1 pkginfo==1.4.2 pluggy==0.6.0 poyo==0.4.1 prompt-toolkit==1.0.15 psycopg2==2.7.5 ptpython==0.41 pudb==2017.1.4 py==1.5.2 pyasn1==0.4.2 pyasn1-modules==0.2.1 pycairo==1.16.2 pycparser==2.18 pycrypto==2.6.1 pycups==1.9.73 Pygments==2.2.0 pygobject==3.26.1 pylint==1.8.1 PyNaCl==1.2.0 pyOpenSSL==17.4.0 Pyro4==4.63 pysrt==1.1.1 python-apt==1.6.2 python-dateutil==2.6.1 python-debian==0.1.32 pytz==2017.3 pyusb==1.0.0 pyxdg==0.25 PyYAML==3.12 rarfile==3.0 rebulk==0.9.0 reportlab==3.4.0 requests==2.18.4 requests-toolbelt==0.8.0 requests-unixsocket==0.1.5 rsa==3.4.2 s3transfer==0.1.13 screen-resolution-extra==0.0.0 SecretStorage==2.3.1 serpent==1.23 service-identity==17.0.0 setproctitle==1.1.10 six==1.11.0 snakeviz==0.4.2 spake2==0.7 sqlparse==0.2.4 stevedore==1.27.1 subliminal==2.0.5 systemd-python==234 tabulate==0.8.2 termcolor==1.1.0 terminaltables==3.1.0 texttable==0.9.1 tornado==4.5.2 tox==3.0.0 tqdm==4.19.4 twine==1.11.0 Twisted==17.9.0 txaio==2.8.2 txtorcon==0.19.3 ubuntu-drivers-common==0.0.0 ufw==0.35 unattended-upgrades==0.1 urllib3==1.22 urwid==1.3.1 vboxapi==1.0 virtualenv==15.1.0 virtualenv-clone==0.2.6 virtualenvwrapper==4.8.2 virtualfish==1.0.5 wcwidth==0.1.7 websocket-client==0.44.0 whichcraft==0.4.1 wrapt==1.10.11 xkit==0.0.0 xonsh==0.6.0 zope.interface==4.4.3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
amjithcommented, Aug 21, 2018

There is an option in the config file.

https://github.com/dbcli/pgcli/blob/master/pgcli/pgclirc#L28

0reactions
butlacommented, Aug 21, 2018

@amjith I know 😃 I actually haven’t seen that in any tool that I’m using regularly as a part of my CLI. Then again, just adding not found options at the end of a section, for example, should be straighforward in an automated fashion, right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Unblock a Command Prompt
1. Log in to the administrative user on your machine. · 2. Press "Windows-R" to launch the Run box. · 3. Click the...
Read more >
How to protect potentially destructive command line options?
I'm curious if anyone can help me with what the best way to protect potentially destructive command line options is for a linux...
Read more >
How To Disable DEP with the Windows 10 Command Line
Type 'bcdedit.exe /set {current} nx AlwaysOff' and hit Enter. You should see 'The operation completed successfully' underneath once complete.
Read more >
What is the deadliest Windows Command Prompt ... - Quora
Delete everything, recurse into subdirectories, and do it quietly (no prompting for confirmation). Note that this won't delete files that you don't have...
Read more >
How to Disable Command Prompt in Windows 10/8/7 [Tutorial]
How to Disable Command Prompt in Windows 10/8/7 [Tutorial]A command prompt is an entry point for typing computer commands in the Command ...
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