403Webshell
Server IP : 85.112.90.236  /  Your IP : 192.168.1.26
Web Server : Apache
System : Linux 85-112-90-236.cprapid.com 6.12.0-211.7.3.el10_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 12:46:58 EDT 2026 x86_64
User : ftechme ( 1002)
PHP Version : 8.2.32
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/thread-self/root/usr/bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/root/usr/bin/register-python-argcomplete
#! /usr/bin/python3 -sP
# PYTHON_ARGCOMPLETE_OK

# Copyright 2012-2023, Andrey Kislyuk and argcomplete contributors.
# Licensed under the Apache License. See https://github.com/kislyuk/argcomplete for more info.

"""
Register a Python executable for use with the argcomplete module.

To perform the registration, source the output of this script in your bash shell
(quote the output to avoid interpolation).

Example:

    $ eval "$(register-python-argcomplete my-favorite-script.py)"

For Tcsh

    $ eval `register-python-argcomplete --shell tcsh my-favorite-script.py`

For Fish

    $ register-python-argcomplete --shell fish my-favourite-script.py > ~/.config/fish/my-favourite-script.py.fish
"""

import argparse
import sys

import argcomplete

parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)

parser.add_argument(
    "--no-defaults",
    dest="use_defaults",
    action="store_false",
    default=True,
    help="when no matches are generated, do not fallback to readline's default completion (affects bash only)",
)
parser.add_argument(
    "--complete-arguments",
    nargs=argparse.REMAINDER,
    help="arguments to call complete with; use of this option discards default options (affects bash only)",
)
parser.add_argument(
    "-s",
    "--shell",
    choices=("bash", "zsh", "tcsh", "fish", "powershell"),
    default="bash",
    help="output code for the specified shell",
)
parser.add_argument(
    "-e", "--external-argcomplete-script", help="external argcomplete script for auto completion of the executable"
)

parser.add_argument("executable", nargs="+", help="executable to completed (when invoked by exactly this name)")

argcomplete.autocomplete(parser)

if len(sys.argv) == 1:
    parser.print_help()
    sys.exit(1)

args = parser.parse_args()


sys.stdout.write(
    argcomplete.shellcode(
        args.executable, args.use_defaults, args.shell, args.complete_arguments, args.external_argcomplete_script
    )
)

Youez - 2016 - github.com/yon3zu
LinuXploit