Package: gitig
gitigGenerate.gitignorefiles from the command-linegitigwrites its output to stdout. Redirect the results to wherever makes sense for you, for example:gipython>.gitignoreInstallationWithcargogitighas an implementation in Rust (and an implementation in Python) and can be installed viacargo:cargoinstallgitig-rsWithpipxgitigis intended to be used as anend-user command-line application(i.e. not as a package's dependency). The easiest way to get started is withpipx:pipxinstallgitigWithpipgitigcan also be installed via vanilla pip (or poetry, etc.):pipinstallgitigUsage$ gi -h
usage: gi [-h] [-v] [--completion {bash,fish}] [--no-pager]
          [template [template ...]]

positional arguments:
  template              Template(s) to include in the generated .gitignore
                        file. If no templates are specified, display a list of
                        all available templates.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --completion {bash,fish}
                        Generate a completion file for the selected shell.
  --no-pager            Write template list to stdout. By default, this
                        program attempts to paginate the list of available
                        templates for easier reading.ExamplesList all available gitignore templates (using a pager if one is available):giGenerate a gitignore file for Python and Jupyter:gipythonjupyternotebooksEnable tab completion for Bash or Fishgitigsupports generating completion scripts for Bash and Fish. Below are commands to generate completion scripts for the various shellsForBash, you will likely have tosource(.) the generated tab completion script for it to take effect.To enable tab completion on startup you can source the completion generated completion script in your.bashrcor.bash_profile.Bashgi--completionbash>/etc/bash_completion.d/gi.bash-completionBash (Homebrew)gi--completionbash>$(brew--prefix)/etc/bash_completion.d/gi.bash-completionFishgi --completionfish>~/.config/fish/completions/gi.fishFish (Homebrew)gi --completionfish>(brew --prefix)/share/fish/vendor_completions.d/gi.fishAPICLIgi# query gitignore.io and list available optionsgipythonjupyternotebooks# write a .gitingore file for python and jupyter to stdoutgi--completionbash# write generated bash autocompletion script to stdoutgi--completionfish# write generated fish autocompletion script to stdoutgi--version# write gitig version info to stdoutAutocompletiongi<TAB><TAB>
1c1c-bitrixactionscript
adaadobeadvancedinstalleradventuregamestudio
agdaalalteraquartusiialtium
...$gipythonj<TAB><TAB>
jabrefjboss6jekylljetbrains+imljoejupyternotebooks
javajboss-4-2-3-gajenvjgivenjoomlajustcode
jbossjboss-6-xjetbrainsjigsawjspm
jboss4jdeveloperjetbrains+alljmeterjuliaRust APIgitig::list_templates();// same as `gi`gitig::create(vec!['python','jupyter']);// same as `gi python jupyter`gitig::bash_completion();// same as `gi --completion bash`gitig::fish_completion();// same as `gi --completion fish`gitig::VERSION;Python APIimportgitiggitig.list_templates()# same as `gi`gitig.create(['python','jupyter'])# same as `gi python jupyter`gitig.bash_completion()# same as `gi --completion bash`gitig.fish_completion()# same as `gi --completion fish`gitig.__version__ContributingRustFork the repoRuncargo buildRunpre-commit installAdd your changes (adding/updating tests is always nice too)Commit your changes + push to your forkOpen a PRPythonHave or install a recent version ofpoetry(version >= 1.1)Fork the repoSetup a virtual environment (however you prefer)Runpoetry installRunpre-commit installAdd your changes (adding/updating tests is always nice too)Commit your changes + push to your forkOpen a PR