diff --git a/completions/poetry.fish b/completions/poetry.fish new file mode 100644 index 0000000..64ac3b5 --- /dev/null +++ b/completions/poetry.fish @@ -0,0 +1,306 @@ +function __fish_poetry_218c008f1b838661_complete_no_subcommand + for i in (commandline -opc) + if contains -- $i about add build cache check config debug env export help init install list lock new publish python remove run search self show source sync update version + return 1 + end + end + return 0 +end + +# global options +complete -c poetry -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -l ansi -d 'Force ANSI output.' +complete -c poetry -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -l directory -d 'The working directory for the Poetry command (defaults to the current working directory). All command-line arguments will be resolved relative to the given directory.' +complete -c poetry -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -l help -d 'Display help for the given command. When no command is given display help for the list command.' +complete -c poetry -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -l no-ansi -d 'Disable ANSI output.' +complete -c poetry -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -l no-cache -d 'Disables Poetry source caches.' +complete -c poetry -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -l no-interaction -d 'Do not ask any interactive question.' +complete -c poetry -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -l no-plugins -d 'Disables plugins.' +complete -c poetry -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -l project -d 'Specify another path as the project root. All command-line arguments will be resolved relative to the current working directory.' +complete -c poetry -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -l quiet -d 'Do not output any message.' +complete -c poetry -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -l verbose -d 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.' +complete -c poetry -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -l version -d 'Display this application version.' + +# commands +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a about -d 'Shows information about Poetry.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a add -d 'Adds a new dependency to pyproject.toml and installs it.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a build -d 'Builds a package, as a tarball and a wheel by default.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a cache +complete -c poetry -f -n '__fish_seen_subcommand_from cache; and not __fish_seen_subcommand_from clear list' -a clear -d 'Clears a Poetry cache by name.' +complete -c poetry -f -n '__fish_seen_subcommand_from cache; and not __fish_seen_subcommand_from clear list' -a list -d 'List Poetry\'s caches.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a check -d 'Validates the content of the pyproject.toml file and its consistency with the poetry.lock file.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a config -d 'Manages configuration settings.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a debug +complete -c poetry -f -n '__fish_seen_subcommand_from debug; and not __fish_seen_subcommand_from info resolve tags' -a info -d 'Shows debug information.' +complete -c poetry -f -n '__fish_seen_subcommand_from debug; and not __fish_seen_subcommand_from info resolve tags' -a resolve -d 'Debugs dependency resolution.' +complete -c poetry -f -n '__fish_seen_subcommand_from debug; and not __fish_seen_subcommand_from info resolve tags' -a tags -d 'Shows compatible tags for your project\'s current active environment.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a env +complete -c poetry -f -n '__fish_seen_subcommand_from env; and not __fish_seen_subcommand_from activate info list remove use' -a activate -d 'Print the command to activate a virtual environment.' +complete -c poetry -f -n '__fish_seen_subcommand_from env; and not __fish_seen_subcommand_from activate info list remove use' -a info -d 'Displays information about the current environment.' +complete -c poetry -f -n '__fish_seen_subcommand_from env; and not __fish_seen_subcommand_from activate info list remove use' -a list -d 'Lists all virtualenvs associated with the current project.' +complete -c poetry -f -n '__fish_seen_subcommand_from env; and not __fish_seen_subcommand_from activate info list remove use' -a remove -d 'Remove virtual environments associated with the project.' +complete -c poetry -f -n '__fish_seen_subcommand_from env; and not __fish_seen_subcommand_from activate info list remove use' -a use -d 'Activates or creates a new virtualenv for the current project.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a export -d 'Exports the lock file to alternative formats.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a help -d 'Displays help for a command.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a init -d 'Creates a basic pyproject.toml file in the current directory.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a install -d 'Installs the project dependencies.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a list -d 'Lists commands.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a lock -d 'Locks the project dependencies.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a new -d 'Creates a new Python project at .' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a publish -d 'Publishes a package to a remote repository.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a python +complete -c poetry -f -n '__fish_seen_subcommand_from python; and not __fish_seen_subcommand_from install list remove' -a install -d 'Install the specified Python version from the Python Standalone Builds project. (experimental feature)' +complete -c poetry -f -n '__fish_seen_subcommand_from python; and not __fish_seen_subcommand_from install list remove' -a list -d 'Shows Python versions available for this environment. (experimental feature)' +complete -c poetry -f -n '__fish_seen_subcommand_from python; and not __fish_seen_subcommand_from install list remove' -a remove -d 'Remove the specified Python version if managed by Poetry. (experimental feature)' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a remove -d 'Removes a package from the project dependencies.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a run -d 'Runs a command in the appropriate environment.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a search -d 'Searches for packages on remote repositories.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a self +complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show sync' -a add -d 'Add additional packages to Poetry\'s runtime environment.' +complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show sync' -a install -d 'Install locked packages (incl. addons) required by this Poetry installation.' +complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show sync' -a lock -d 'Lock the Poetry installation\'s system requirements.' +complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show sync' -a remove -d 'Remove additional packages from Poetry\'s runtime environment.' +complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show sync' -a show -d 'Show packages from Poetry\'s runtime environment.' +complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show sync' -a plugins -d 'Shows information about the currently installed plugins.' +complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show sync' -a sync -d 'Sync Poetry\'s own environment according to the locked packages (incl. addons) required by this Poetry installation.' +complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show sync' -a update -d 'Updates Poetry to the latest version.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a show -d 'Shows information about packages.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a source +complete -c poetry -f -n '__fish_seen_subcommand_from source; and not __fish_seen_subcommand_from add remove show' -a add -d 'Add source configuration for project.' +complete -c poetry -f -n '__fish_seen_subcommand_from source; and not __fish_seen_subcommand_from add remove show' -a remove -d 'Remove source configured for the project.' +complete -c poetry -f -n '__fish_seen_subcommand_from source; and not __fish_seen_subcommand_from add remove show' -a show -d 'Show information about sources configured for the project.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a sync -d 'Update the project\'s environment according to the lockfile.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a update -d 'Update the dependencies as according to the pyproject.toml file.' +complete -c poetry -f -n '__fish_poetry_218c008f1b838661_complete_no_subcommand' -a version -d 'Shows the version of the project or bumps it when a valid bump rule is provided.' + +# command options + +# about + +# add +complete -c poetry -n '__fish_seen_subcommand_from add' -l allow-prereleases -d 'Accept prereleases.' +complete -c poetry -n '__fish_seen_subcommand_from add' -l dev -d 'Add as a development dependency. (shortcut for \'-G dev\')' +complete -c poetry -n '__fish_seen_subcommand_from add' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' +complete -c poetry -n '__fish_seen_subcommand_from add' -l editable -d 'Add vcs/path dependencies as editable.' +complete -c poetry -n '__fish_seen_subcommand_from add' -l extras -d 'Extras to activate for the dependency.' +complete -c poetry -n '__fish_seen_subcommand_from add' -l group -d 'The group to add the dependency to.' +complete -c poetry -n '__fish_seen_subcommand_from add' -l lock -d 'Do not perform operations (only update the lockfile).' +complete -c poetry -n '__fish_seen_subcommand_from add' -l markers -d 'Environment markers which describe when the dependency should be installed.' +complete -c poetry -n '__fish_seen_subcommand_from add' -l optional -d 'Add as an optional dependency to an extra.' +complete -c poetry -n '__fish_seen_subcommand_from add' -l platform -d 'Platforms for which the dependency must be installed.' +complete -c poetry -n '__fish_seen_subcommand_from add' -l python -d 'Python version for which the dependency must be installed.' +complete -c poetry -n '__fish_seen_subcommand_from add' -l source -d 'Name of the source to use to install the package.' + +# build +complete -c poetry -n '__fish_seen_subcommand_from build' -l clean -d 'Clean output directory before building.' +complete -c poetry -n '__fish_seen_subcommand_from build' -l config-settings -d 'Provide config settings that should be passed to backend in = format.' +complete -c poetry -n '__fish_seen_subcommand_from build' -l format -d 'Limit the format to either sdist or wheel.' +complete -c poetry -n '__fish_seen_subcommand_from build' -l local-version -d 'Add or replace a local version label to the build. (Deprecated)' +complete -c poetry -n '__fish_seen_subcommand_from build' -l output -d 'Set output directory for build artifacts. Default is `dist`.' + +# cache clear +complete -c poetry -n '__fish_seen_subcommand_from cache; and __fish_seen_subcommand_from clear' -l all -d 'Clear all entries in the cache.' + +# cache list + +# check +complete -c poetry -n '__fish_seen_subcommand_from check' -l lock -d 'Checks that poetry.lock exists for the current version of pyproject.toml.' +complete -c poetry -n '__fish_seen_subcommand_from check' -l strict -d 'Fail if check reports warnings.' + +# config +complete -c poetry -n '__fish_seen_subcommand_from config' -l list -d 'List configuration settings.' +complete -c poetry -n '__fish_seen_subcommand_from config' -l local -d 'Set/Get from the project\'s local configuration.' +complete -c poetry -n '__fish_seen_subcommand_from config' -l migrate -d 'Migrate outdated configuration settings.' +complete -c poetry -n '__fish_seen_subcommand_from config' -l unset -d 'Unset configuration setting.' + +# debug info + +# debug resolve +complete -c poetry -n '__fish_seen_subcommand_from debug; and __fish_seen_subcommand_from resolve' -l extras -d 'Extras to activate for the dependency.' +complete -c poetry -n '__fish_seen_subcommand_from debug; and __fish_seen_subcommand_from resolve' -l install -d 'Show what would be installed for the current system.' +complete -c poetry -n '__fish_seen_subcommand_from debug; and __fish_seen_subcommand_from resolve' -l python -d 'Python version(s) to use for resolution.' +complete -c poetry -n '__fish_seen_subcommand_from debug; and __fish_seen_subcommand_from resolve' -l tree -d 'Display the dependency tree.' + +# debug tags + +# env activate + +# env info +complete -c poetry -n '__fish_seen_subcommand_from env; and __fish_seen_subcommand_from info' -l executable -d 'Only display the environment\'s python executable path.' +complete -c poetry -n '__fish_seen_subcommand_from env; and __fish_seen_subcommand_from info' -l path -d 'Only display the environment\'s path.' + +# env list +complete -c poetry -n '__fish_seen_subcommand_from env; and __fish_seen_subcommand_from list' -l full-path -d 'Output the full paths of the virtualenvs.' + +# env remove +complete -c poetry -n '__fish_seen_subcommand_from env; and __fish_seen_subcommand_from remove' -l all -d 'Remove all managed virtual environments associated with the project.' + +# env use + +# export +complete -c poetry -n '__fish_seen_subcommand_from export' -l all-extras -d 'Include all sets of extra dependencies.' +complete -c poetry -n '__fish_seen_subcommand_from export' -l all-groups -d 'Include all dependency groups' +complete -c poetry -n '__fish_seen_subcommand_from export' -l dev -d 'Include development dependencies. (Deprecated)' +complete -c poetry -n '__fish_seen_subcommand_from export' -l extras -d 'Extra sets of dependencies to include.' +complete -c poetry -n '__fish_seen_subcommand_from export' -l format -d 'Format to export to. Currently, only constraints.txt and requirements.txt are supported.' +complete -c poetry -n '__fish_seen_subcommand_from export' -l only -d 'The only dependency groups to include.' +complete -c poetry -n '__fish_seen_subcommand_from export' -l output -d 'The name of the output file.' +complete -c poetry -n '__fish_seen_subcommand_from export' -l with -d 'The optional and non-optional dependency groups to include. By default, only the main dependencies are included.' +complete -c poetry -n '__fish_seen_subcommand_from export' -l with-credentials -d 'Include credentials for extra indices.' +complete -c poetry -n '__fish_seen_subcommand_from export' -l without -d 'The dependency groups to ignore. (Deprecated)' +complete -c poetry -n '__fish_seen_subcommand_from export' -l without-hashes -d 'Exclude hashes from the exported file.' +complete -c poetry -n '__fish_seen_subcommand_from export' -l without-urls -d 'Exclude source repository urls from the exported file.' + +# help + +# init +complete -c poetry -n '__fish_seen_subcommand_from init' -l author -d 'Author name of the package.' +complete -c poetry -n '__fish_seen_subcommand_from init' -l dependency -d 'Package to require, with an optional version constraint, e.g. requests:^2.10.0 or requests=2.11.1.' +complete -c poetry -n '__fish_seen_subcommand_from init' -l description -d 'Description of the package.' +complete -c poetry -n '__fish_seen_subcommand_from init' -l dev-dependency -d 'Package to require for development, with an optional version constraint, e.g. requests:^2.10.0 or requests=2.11.1.' +complete -c poetry -n '__fish_seen_subcommand_from init' -l license -d 'License of the package.' +complete -c poetry -n '__fish_seen_subcommand_from init' -l name -d 'Name of the package.' +complete -c poetry -n '__fish_seen_subcommand_from init' -l python -d 'Compatible Python versions.' + +# install +complete -c poetry -n '__fish_seen_subcommand_from install' -l all-extras -d 'Install all extra dependencies.' +complete -c poetry -n '__fish_seen_subcommand_from install' -l all-groups -d 'Install dependencies from all groups.' +complete -c poetry -n '__fish_seen_subcommand_from install' -l compile -d 'Compile Python source files to bytecode.' +complete -c poetry -n '__fish_seen_subcommand_from install' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' +complete -c poetry -n '__fish_seen_subcommand_from install' -l extras -d 'Extra sets of dependencies to install.' +complete -c poetry -n '__fish_seen_subcommand_from install' -l no-directory -d 'Do not install any directory path dependencies; useful to install dependencies without source code, e.g. for caching of Docker layers)' +complete -c poetry -n '__fish_seen_subcommand_from install' -l no-root -d 'Do not install the root package (the current project).' +complete -c poetry -n '__fish_seen_subcommand_from install' -l only -d 'The only dependency groups to include.' +complete -c poetry -n '__fish_seen_subcommand_from install' -l only-root -d 'Exclude all dependencies.' +complete -c poetry -n '__fish_seen_subcommand_from install' -l sync -d 'Synchronize the environment with the locked packages and the specified groups. (Deprecated)' +complete -c poetry -n '__fish_seen_subcommand_from install' -l with -d 'The optional dependency groups to include.' +complete -c poetry -n '__fish_seen_subcommand_from install' -l without -d 'The dependency groups to ignore.' + +# list + +# lock +complete -c poetry -n '__fish_seen_subcommand_from lock' -l regenerate -d 'Ignore existing lock file and overwrite it with a new lock file created from scratch.' + +# new +complete -c poetry -n '__fish_seen_subcommand_from new' -l author -d 'Author name of the package.' +complete -c poetry -n '__fish_seen_subcommand_from new' -l dependency -d 'Package to require, with an optional version constraint, e.g. requests:^2.10.0 or requests=2.11.1.' +complete -c poetry -n '__fish_seen_subcommand_from new' -l description -d 'Description of the package.' +complete -c poetry -n '__fish_seen_subcommand_from new' -l dev-dependency -d 'Package to require for development, with an optional version constraint, e.g. requests:^2.10.0 or requests=2.11.1.' +complete -c poetry -n '__fish_seen_subcommand_from new' -l flat -d 'Use the flat layout for the project.' +complete -c poetry -n '__fish_seen_subcommand_from new' -l interactive -d 'Allow interactive specification of project configuration.' +complete -c poetry -n '__fish_seen_subcommand_from new' -l license -d 'License of the package.' +complete -c poetry -n '__fish_seen_subcommand_from new' -l name -d 'Set the resulting package name.' +complete -c poetry -n '__fish_seen_subcommand_from new' -l python -d 'Compatible Python versions.' +complete -c poetry -n '__fish_seen_subcommand_from new' -l readme -d 'Specify the readme file format. Default is md.' +complete -c poetry -n '__fish_seen_subcommand_from new' -l src -d 'Use the src layout for the project. Deprecated: This is the default option now.' + +# publish +complete -c poetry -n '__fish_seen_subcommand_from publish' -l build -d 'Build the package before publishing.' +complete -c poetry -n '__fish_seen_subcommand_from publish' -l cert -d 'Certificate authority to access the repository.' +complete -c poetry -n '__fish_seen_subcommand_from publish' -l client-cert -d 'Client certificate to access the repository.' +complete -c poetry -n '__fish_seen_subcommand_from publish' -l dist-dir -d 'Dist directory where built artifact are stored. Default is `dist`.' +complete -c poetry -n '__fish_seen_subcommand_from publish' -l dry-run -d 'Perform all actions except upload the package.' +complete -c poetry -n '__fish_seen_subcommand_from publish' -l password -d 'The password to access the repository.' +complete -c poetry -n '__fish_seen_subcommand_from publish' -l repository -d 'The repository to publish the package to.' +complete -c poetry -n '__fish_seen_subcommand_from publish' -l skip-existing -d 'Ignore errors from files already existing in the repository.' +complete -c poetry -n '__fish_seen_subcommand_from publish' -l username -d 'The username to access the repository.' + +# python install +complete -c poetry -n '__fish_seen_subcommand_from python; and __fish_seen_subcommand_from install' -l clean -d 'Clean up installation if check fails.' +complete -c poetry -n '__fish_seen_subcommand_from python; and __fish_seen_subcommand_from install' -l free-threaded -d 'Use free-threaded version if available.' +complete -c poetry -n '__fish_seen_subcommand_from python; and __fish_seen_subcommand_from install' -l implementation -d 'Python implementation to use. (cpython, pypy)' +complete -c poetry -n '__fish_seen_subcommand_from python; and __fish_seen_subcommand_from install' -l reinstall -d 'Reinstall if installation already exists.' + +# python list +complete -c poetry -n '__fish_seen_subcommand_from python; and __fish_seen_subcommand_from list' -l all -d 'List all versions, including those available for download.' +complete -c poetry -n '__fish_seen_subcommand_from python; and __fish_seen_subcommand_from list' -l implementation -d 'Python implementation to search for.' +complete -c poetry -n '__fish_seen_subcommand_from python; and __fish_seen_subcommand_from list' -l managed -d 'List only Poetry managed Python versions.' + +# python remove +complete -c poetry -n '__fish_seen_subcommand_from python; and __fish_seen_subcommand_from remove' -l implementation -d 'Python implementation to use. (cpython, pypy)' + +# remove +complete -c poetry -n '__fish_seen_subcommand_from remove' -l dev -d 'Remove a package from the development dependencies. (shortcut for \'-G dev\')' +complete -c poetry -n '__fish_seen_subcommand_from remove' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' +complete -c poetry -n '__fish_seen_subcommand_from remove' -l group -d 'The group to remove the dependency from.' +complete -c poetry -n '__fish_seen_subcommand_from remove' -l lock -d 'Do not perform operations (only update the lockfile).' + +# run + +# search + +# self add +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from add' -l allow-prereleases -d 'Accept prereleases.' +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from add' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from add' -l editable -d 'Add vcs/path dependencies as editable.' +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from add' -l extras -d 'Extras to activate for the dependency.' +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from add' -l source -d 'Name of the source to use to install the package.' + +# self install +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from install' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from install' -l sync -d 'Synchronize the environment with the locked packages and the specified groups. (Deprecated)' + +# self lock +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from lock' -l regenerate -d 'Ignore existing lock file and overwrite it with a new lock file created from scratch.' + +# self remove +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from remove' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' + +# self show +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from show' -l addons -d 'List only add-on packages installed.' +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from show' -l latest -d 'Show the latest version.' +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from show' -l outdated -d 'Show the latest version but only for packages that are outdated.' +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from show' -l tree -d 'List the dependencies as a tree.' + +# self show plugins + +# self sync +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from sync' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' + +# self update +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from update' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' +complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from update' -l preview -d 'Allow the installation of pre-release versions.' + +# show +complete -c poetry -n '__fish_seen_subcommand_from show' -l all -d 'Show all packages (even those not compatible with current system).' +complete -c poetry -n '__fish_seen_subcommand_from show' -l latest -d 'Show the latest version.' +complete -c poetry -n '__fish_seen_subcommand_from show' -l no-truncate -d 'Do not truncate the output based on the terminal width.' +complete -c poetry -n '__fish_seen_subcommand_from show' -l only -d 'The only dependency groups to include.' +complete -c poetry -n '__fish_seen_subcommand_from show' -l outdated -d 'Show the latest version but only for packages that are outdated.' +complete -c poetry -n '__fish_seen_subcommand_from show' -l top-level -d 'Show only top-level dependencies.' +complete -c poetry -n '__fish_seen_subcommand_from show' -l tree -d 'List the dependencies as a tree.' +complete -c poetry -n '__fish_seen_subcommand_from show' -l why -d 'When showing the full list, or a --tree for a single package, display whether they are a direct dependency or required by other packages' +complete -c poetry -n '__fish_seen_subcommand_from show' -l with -d 'The optional dependency groups to include.' +complete -c poetry -n '__fish_seen_subcommand_from show' -l without -d 'The dependency groups to ignore.' + +# source add +complete -c poetry -n '__fish_seen_subcommand_from source; and __fish_seen_subcommand_from add' -l priority -d 'Set the priority of this source. One of: primary, supplemental, explicit. Defaults to primary, but will switch to supplemental in a later release.' + +# source remove + +# source show + +# sync +complete -c poetry -n '__fish_seen_subcommand_from sync' -l all-extras -d 'Install all extra dependencies.' +complete -c poetry -n '__fish_seen_subcommand_from sync' -l all-groups -d 'Install dependencies from all groups.' +complete -c poetry -n '__fish_seen_subcommand_from sync' -l compile -d 'Compile Python source files to bytecode.' +complete -c poetry -n '__fish_seen_subcommand_from sync' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' +complete -c poetry -n '__fish_seen_subcommand_from sync' -l extras -d 'Extra sets of dependencies to install.' +complete -c poetry -n '__fish_seen_subcommand_from sync' -l no-directory -d 'Do not install any directory path dependencies; useful to install dependencies without source code, e.g. for caching of Docker layers)' +complete -c poetry -n '__fish_seen_subcommand_from sync' -l no-root -d 'Do not install the root package (the current project).' +complete -c poetry -n '__fish_seen_subcommand_from sync' -l only -d 'The only dependency groups to include.' +complete -c poetry -n '__fish_seen_subcommand_from sync' -l only-root -d 'Exclude all dependencies.' +complete -c poetry -n '__fish_seen_subcommand_from sync' -l with -d 'The optional dependency groups to include.' +complete -c poetry -n '__fish_seen_subcommand_from sync' -l without -d 'The dependency groups to ignore.' + +# update +complete -c poetry -n '__fish_seen_subcommand_from update' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' +complete -c poetry -n '__fish_seen_subcommand_from update' -l lock -d 'Do not perform operations (only update the lockfile).' +complete -c poetry -n '__fish_seen_subcommand_from update' -l only -d 'The only dependency groups to include.' +complete -c poetry -n '__fish_seen_subcommand_from update' -l sync -d 'Synchronize the environment with the locked packages and the specified groups.' +complete -c poetry -n '__fish_seen_subcommand_from update' -l with -d 'The optional dependency groups to include.' +complete -c poetry -n '__fish_seen_subcommand_from update' -l without -d 'The dependency groups to ignore.' + +# version +complete -c poetry -n '__fish_seen_subcommand_from version' -l dry-run -d 'Do not update pyproject.toml file' +complete -c poetry -n '__fish_seen_subcommand_from version' -l next-phase -d 'Increment the phase of the current version' +complete -c poetry -n '__fish_seen_subcommand_from version' -l short -d 'Output the version number only' diff --git a/conf.d/omf.fish b/conf.d/omf.fish old mode 100644 new mode 100755 diff --git a/config.fish b/config.fish old mode 100644 new mode 100755 index 93ed18b..269f55f --- a/config.fish +++ b/config.fish @@ -52,16 +52,5 @@ if status is-interactive end end - fastfetch -end - -set -x QT_QPA_PLATFORMTHEME qt6ct - -# Fish done Configuration -set -U __done_allow_nongraphical 1 -set -U __done_min_cmd_duration 5000 # 5000 # default: 5000 ms # 5 seconds -set -U __done_notify_sound 1 -set -U __done_sway_ignore_visible 0 - -set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin /home/honney/.ghcup/bin $PATH # ghcup-env \ No newline at end of file +end \ No newline at end of file diff --git a/configs/alias_custom-script.fish b/configs/alias_custom-script.fish old mode 100644 new mode 100755 diff --git a/configs/alias_fixing.fish b/configs/alias_fixing.fish old mode 100644 new mode 100755 index 582627a..1cd8d97 --- a/configs/alias_fixing.fish +++ b/configs/alias_fixing.fish @@ -11,5 +11,6 @@ end if test -f $HOME/.config/fish/alias.fish source $HOME/.config/fish/alias.fish end +eval (zoxide init fish) zoxide init fish | source -alias cd='z' \ No newline at end of file +alias cd='z' diff --git a/configs/alias_useful.fish b/configs/alias_useful.fish old mode 100644 new mode 100755 index ea2ae85..d2edd21 --- a/configs/alias_useful.fish +++ b/configs/alias_useful.fish @@ -1,5 +1,5 @@ # -# In ~/.config/fish/configs/alias_useful.fish +# In ~/.config/fish/config.fish # if test "$TERM" = "xterm-kitty" @@ -56,7 +56,7 @@ alias .... 'cd ../../..' alias ..... 'cd ../../../..' alias ...... 'cd ../../../../..' -alias grep 'ugrep --color=auto' +#alias grep 'ugrep --color=auto' alias egrep 'ugrep -E --color=auto' alias fgrep 'ugrep -F --color=auto' @@ -102,4 +102,14 @@ function nanorm rm $arg end nano $arg -end \ No newline at end of file +end + +function sudo + if test -x /usr/bin/sudo-rs + command sudo-rs $argv + else + command sudo $argv + end +end + +alias ssh='env TERM=xterm-256color ssh' \ No newline at end of file diff --git a/configs/arch_config.fish b/configs/arch_config.fish old mode 100644 new mode 100755 index 89d41e5..5126ff5 --- a/configs/arch_config.fish +++ b/configs/arch_config.fish @@ -52,7 +52,7 @@ alias rip 'expac --timefmt="%Y-%m-%d %T" "%l\t%n %v" | sort | tail -200 | nl' function cleanup while pacman -Qdtq - sudo pacman -R (pacman -Qdtq) + sudo pacman -R (pacman -Qdtq) end end @@ -68,4 +68,11 @@ function y builtin cd -- "$cwd" end rm -f -- "$tmp" -end \ No newline at end of file +end + +set -x QT_QPA_PLATFORMTHEME qt5ct + +set -x XCURSOR_THEME "DJ-FOX-C" +set -x XCURSOR_SIZE 24 + +alias py311="$HOME/.local/python-3.11.9/bin/python3.11" \ No newline at end of file diff --git a/configs/default_config.fish b/configs/default_config.fish old mode 100644 new mode 100755 diff --git a/configs/fedora_config.fish b/configs/fedora_config.fish old mode 100644 new mode 100755 index 9dfc5cb..48d9dab --- a/configs/fedora_config.fish +++ b/configs/fedora_config.fish @@ -1,8 +1,7 @@ # # ~/.config/fish/configs/fedora_config.fish # + alias ff='$HOME/.bin/simple_ffprobe_script' -alias ssh='env TERM=xterm-256color ssh' - alias updateall='sudo dnf upgrade --refresh && flatpak update' \ No newline at end of file diff --git a/configs/function_usefull.fish b/configs/function_usefull.fish deleted file mode 100644 index d924fe7..0000000 --- a/configs/function_usefull.fish +++ /dev/null @@ -1,10 +0,0 @@ - -# yazi file manager wrapper -function y - set tmp (mktemp -t "yazi-cwd.XXXXXX") - yazi $argv --cwd-file="$tmp" - if read -z cwd < "$tmp"; and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - builtin cd -- "$cwd" - end - rm -f -- "$tmp" -end \ No newline at end of file diff --git a/configs/theme.fish b/configs/theme.fish old mode 100644 new mode 100755 index aab55a3..e629be1 --- a/configs/theme.fish +++ b/configs/theme.fish @@ -1,4 +1,31 @@ -# OPTIONS FOR BOBTHEFISH (Theme) +# Load pywal colors (extract from ~/.cache/wal/colors.json) +set -g theme_0 (jq -r '.colors.color0' ~/.cache/wal/colors.json) # Primary color +set -g theme_1 (jq -r '.colors.color1' ~/.cache/wal/colors.json) # Secondary color (e.g., for git, @) +set -g theme_2 (jq -r '.colors.color2' ~/.cache/wal/colors.json) # Third color (e.g., for hostname) +set -g background_color (jq -r '.special.background' ~/.cache/wal/colors.json) # Background color +set -g foreground_color (jq -r '.special.foreground' ~/.cache/wal/colors.json) # Foreground color + +# BOBTHEFISH COLORING: Apply pywal colors to the bobthefish theme + +# Username Color +set -g theme_username_color $theme_0 + +# Hostname Color +set -g theme_hostname_color $theme_2 + +# Git prompt color +set -g theme_git_branch_color $theme_1 +set -g theme_git_dirty_color $theme_1 +set -g theme_git_staged_color $theme_2 + +# Current directory color +set -g theme_pwd_color $theme_0 + +# Set background and foreground based on pywal theme +set -g theme_background_color $background_color +set -g theme_foreground_color $foreground_color + +# Retain all existing theme settings (don't overwrite the options you have) set -g theme_display_git yes set -g theme_display_git_dirty no set -g theme_display_git_untracked no @@ -38,4 +65,4 @@ set -g theme_color_scheme dark set -g fish_prompt_pwd_dir_length 0 set -g theme_project_dir_length 1 set -g theme_newline_cursor yes -set -g theme_newline_prompt '$ ' \ No newline at end of file +set -g theme_newline_prompt '$ ' diff --git a/configs/ubuntu_config.fish b/configs/ubuntu_config.fish old mode 100644 new mode 100755 diff --git a/fish_variables b/fish_variables old mode 100644 new mode 100755 index bceba05..6a3b24d --- a/fish_variables +++ b/fish_variables @@ -1,6 +1,7 @@ # This file contains fish universal variable definitions. # VERSION: 3.0 -SETUVAR --export EDITOR:/usr/bin/nvim +SETUVAR --export ANDROID_HOME:/home/honney/Android/Sdk +SETUVAR --export ANDROID_SDK_ROOT:/home/honney/Android/Sdk SETUVAR __done_allow_nongraphical:1 SETUVAR __done_min_cmd_duration:5000 SETUVAR __done_notify_sound:1 @@ -34,4 +35,4 @@ SETUVAR fish_pager_color_description:yellow\x1e\x2di SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan SETUVAR fish_pager_color_selected_background:\x2dr -SETUVAR fish_user_paths:/home/honney/Nextcloud/UNI/25\x2d26_TI/BSP/arm/bin\x1e/home/honney/\x2ebin\x1e/home/honney/\x2elocal/bin +SETUVAR fish_user_paths:/home/honney/mount/Storage/Nextcloud/UNI/25\x2d26_TI/BSP/toolchain/arm/bin\x1e/home/honney/\x2ebin\x1e/home/honney/\x2elocal/bin diff --git a/functions/compare_sha256.fish b/functions/compare_sha256.fish new file mode 100755 index 0000000..627951d --- /dev/null +++ b/functions/compare_sha256.fish @@ -0,0 +1,15 @@ +function compare_sha256 + if test (count $argv) -ne 2 + echo "Usage: compare_sha256 " + return 1 + end + + set hash1 (sha256sum $argv[1] | awk '{print $1}') + set hash2 (sha256sum $argv[2] | awk '{print $1}') + + if test "$hash1" = "$hash2" + echo "Match" + else + echo "Different" + end +end diff --git a/functions/extract.fish b/functions/extract.fish new file mode 100755 index 0000000..6c432dd --- /dev/null +++ b/functions/extract.fish @@ -0,0 +1,57 @@ +function extract + if test (count $argv) -lt 1 + echo "Usage: extract [output_directory]" + return 1 + end + + set output_dir "." + set archives $argv + + # If there's more than one argument, check the last one for a directory + if test (count $argv) -gt 1 + set maybe_dir $argv[-1] + if not test -f $maybe_dir + set output_dir $maybe_dir + mkdir -p $output_dir + set archives $argv[1..-2] + end + else + # If only one argument and it's a file, create directory with same name as archive (without extension) + set archive $argv[1] + if test -f "$archive" + set output_dir (string replace -r '\.(tar\.gz|tgz|tar\.bz2|tbz2|tar\.xz|txz|gz|bz2|xz|zst|zip|7z|rar)$' '' (basename "$archive")) + mkdir -p $output_dir + end + end + + for archive in $archives + if not test -f "$archive" + echo "extract: '$archive' is not a valid file" + continue + end + + set mime (file --mime-type -b "$archive") + + switch $mime + case 'application/x-tar' + tar xvf "$archive" -C "$output_dir" + case 'application/gzip' + tar xvzf "$archive" -C "$output_dir" ^/dev/null; or gunzip -c "$archive" > "$output_dir/(basename (string replace -r '\.gz$' '' "$archive"))" + case 'application/x-bzip2' + tar xvjf "$archive" -C "$output_dir" ^/dev/null; or bunzip2 -c "$archive" > "$output_dir/(basename (string replace -r '\.bz2$' '' "$archive"))" + case 'application/x-xz' + tar xvJf "$archive" -C "$output_dir" ^/dev/null; or unxz -c "$archive" > "$output_dir/(basename (string replace -r '\.xz$' '' "$archive"))" + case 'application/zstd' + tar --zstd -xvf "$archive" -C "$output_dir" ^/dev/null; or unzstd -c "$archive" > "$output_dir/(basename (string replace -r '\.zst$' '' "$archive"))" + case 'application/zip' + unzip -j "$archive" -d "$output_dir" + case 'application/x-7z-compressed' + 7z x "$archive" -o"$output_dir" + case 'application/x-rar' 'application/vnd.rar' + unrar x -o+ "$archive" "$output_dir" + case '*' + echo "extract: unknown file type for '$archive' ($mime)" + continue + end + end +end diff --git a/functions/fish_prompt.fish_bak b/functions/fish_prompt.fish_bak new file mode 100755 index 0000000..9f347e4 --- /dev/null +++ b/functions/fish_prompt.fish_bak @@ -0,0 +1,15 @@ +# Load pywal colors +set -g theme_0 (jq -r '.colors.color0' ~/.cache/wal/colors.json) # Color0 for general text +set -g theme_1 (jq -r '.colors.color1' ~/.cache/wal/colors.json) # Color1 for highlights (e.g., @ symbol) +set -g theme_2 (jq -r '.colors.color2' ~/.cache/wal/colors.json) # Color2 for hostname +set -g background_color (jq -r '.special.background' ~/.cache/wal/colors.json) # Background color +set -g foreground_color (jq -r '.special.foreground' ~/.cache/wal/colors.json) # Foreground color + +# Customize your prompt +function fish_prompt + # Set background and foreground colors + echo -n (set_color $background_color) # Set background color + echo -n (set_color $foreground_color) # Set foreground color for text + echo -n (set_color $theme_0) 'user' (set_color $theme_1) '@' (set_color $theme_2) 'host' (set_color normal) '> ' +end + diff --git a/functions/pack.fish b/functions/pack.fish new file mode 100755 index 0000000..95a11b2 --- /dev/null +++ b/functions/pack.fish @@ -0,0 +1,16 @@ +function pack + if test (count $argv) -lt 2 + echo "Usage: pack [more files...]" + return 1 + end + + set archive $argv[1] + set targets $argv[2..-1] + + # Ensure .tar.xz extension + if not string match -r '\.tar\.xz$' -- $archive + set archive "$archive.tar.xz" + end + + tar -cJvf $archive $targets +end diff --git a/scripts/git-update.sh b/scripts/git-update.sh old mode 100644 new mode 100755 diff --git a/scripts/mount.sh b/scripts/mount.sh old mode 100644 new mode 100755 diff --git a/scripts/shutdown-server.sh b/scripts/shutdown-server.sh old mode 100644 new mode 100755 diff --git a/scripts/umount.sh b/scripts/umount.sh old mode 100644 new mode 100755