Giter VIP home page Giter VIP logo

gibo's Introduction

gibo: fast access to .gitignore boilerplates

gibo (short for .gitignore boilerplates) is a command-line tool to help you easily access .gitignore boilerplates from github.com/github/gitignore.

Typical usage

gibo dump Swift Xcode >> .gitignore

For additional usage instructions, run gibo help.

Installation

Using Homebrew

brew install gibo

Or use the tap, which may be slightly more up-to-date:

brew install simonwhitaker/tap/gibo

Using Scoop

On Windows, you can install gibo using Scoop:

scoop bucket add main
scoop install main/gibo

Using Chocolatey

choco install gibo

Using the Go toolchain

go install github.com/simonwhitaker/gibo@latest

Building from source

Clone the repo, then:

cd gibo
go install .

Downloading a binary

Download the latest release for your platform, then put gibo (or gibo.exe) somewhere on your path.

Installation on Docker

docker run --rm simonwhitaker/gibo

Tab completion in bash, zsh, fish and Powershell

See the instructions at:

gibo completion

Use gibo to generate .hgignore files

The glob .hgignore syntax for Mercurial is compatible with .gitignore syntax. This means that you can use gibo to generate .hgignore files, as long as the .hgignore files use the glob syntax:

echo 'syntax: glob' > .hgignore
gibo dump Python >> .hgignore

Credits

gibo was written by Simon Whitaker (@s1mn)

gibo's People

Contributors

atsushifx avatar bartoszmajsak avatar blp1526 avatar dependabot[bot] avatar genzouw avatar hana-da avatar hugovk avatar itiut avatar ixti avatar jakejohns avatar kai2nenobu avatar kodybrown avatar mitsutoshinakano avatar murcie avatar nicdumz avatar saschpe avatar shotat avatar simonwhitaker avatar susisu avatar yaegassy avatar yevgenko avatar yilazius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gibo's Issues

.gitignore encoding is UTF-16 LE from `gibo dump`

My environment

  • OS: Windows 10
  • Shell: PowerShell (Not use WSL)
  • Git version: 2.20.1.windows.1

PowerShell version

Name                           Value
----                           -----
PSVersion                      5.1.17763.134
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.134
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Expected

.gitignore file encoding is UTF-8 from gibo dump

Actual

.gitignore file encoding is UTF-16 LE from gibo dump

Reproduce

  1. scoop install gibo
  2. Run gibo dump Node Windows >> .gitignore on any directory

Screenshot

gitignore

Package for homebrew

should be pretty simple?

symlink into /usr/local/bin

also copy the shell completions into the correct folder

Config option for default .gitignore stack?

Do you have any thoughts on adding a default gibo config setting?

For example, I use the same .gitignore files most of the time for most projects, so it would be nice to be able to type something like

$ gibo -d

vs

$ gibo macOS SublimeText Python >> .gitignore

I setup an MVP of this with an alias in my ~/.bash_profile for now:

alias gibod="gibo macOS SublimeText Python >> .gitignore"

Raw path to link to SHA instead of the branch name

Hi,

I think it would be better to point to the specific SHA version of a given file in commented out raw paths instead of master for instance, since I may want to know what's changed on the original repo since I updated my .gitignore file.

What do you think?

Thank you.

Bad Substitution (nested variable access)

When using gibo dump with gibo 2.2.1, the following error occurs:

~/bin/gibo: 95: ~/bin/gibo: Bad substitution

gibo/gibo

Line 95 in 61d0aff

echo "### $remote_web_root${language_file/$local_repo/}"

Indeed, the variable access is here nested, I think this should be:

echo "### $remote_web_root${language_file}/$local_repo/"

setopt lines break when not run through bash

gibo/gibo

Lines 6 to 9 in bd5710b

set -o errexit
set -o noclobber
set -o nounset
set -o pipefail

On my system (Linux Mint) /bin/sh is symlinked to dash. Thus, executing the gibo script directly from the command-line no longer works due the the "set -o" lines at the top of the script.

$ ./gibo update
./gibo: 9: set: Illegal option -o pipefail

I have to run it through bash explicitly (e.g. bash gibo update).

[v2] Update gibo.bat to use subcommand model

gibo 2.0 adopts a subcommand model for its command line UI. Here's the relevant portion of the usage text:

Usage:
    gibo [command]

Example:
    gibo dump Swift Xcode >> .gitignore

Commands:
    list            List available boilerplates
    update          Update list of available boilerplates
    help            Display this help text
    version         Display current script version
    dump BOILERPLATE...
                    Write boilerplate(s) to STDOUT

The changes from v1.x are summarised as follows:

gibo 1.x gibo 2.0
gibo -h, gibo --help gibo help
gibo -l, gibo --list gibo list
gibo -u, gibo --upgrade gibo update (note the rename: upgrade -> update)
gibo -v, gibo --version gibo version
gibo BOILERPLATE gibo dump BOILERPLATE

cache for offline use

Would it be possible to add the ability to cache retrieved gitignore files to be used as a fallback when there isn't network connectivity to fetch from github?

I'd be happy to work on the patch if there's a good chance it would be accepted.

confusing usage example

Hi,

This is an awesome tool to save the time to write gitignore.
I always use this tool when starting new projects.

By the way, let me tell you that the update for some parts of code seemed delayed.

The example seems the previous usage.

gibo/gibo.bat

Line 32 in ff9f2f8

echo %basename% Python TextMate ^>^> .gitignore

Error: object not found

Installed via Homebrew and running version 3.0.12. I am getting…

2024/07/03 12:15:56 object not found

… error when I run gibo update.

gibo dump includes additional output when installed from scoop on windows

Running e.g. gibo dump Linux on Windows results in the following output:

### Linux

Das System kann die angegebene Datei nicht finden.


### Linux

*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*


Unknown argument: Linux

If the Unknown argument error would be printed to stderr this would be less of a problem, but it is not:
Running gibo dump Linux > test results in a test file with the following contents

### Linux



### Linux

*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*


Unknown argument: Linux

Installed using scoop

Unknown Argument: {Boilerplate}

The following command

gibo dump Python VisualStudioCode Windows >> .gitignore

yields

The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.

in the terminal, and Unknown Argument: Python (or VisualStudioCode or Windows) in the .gitignore file. The boilerplate heading also seems to be repeated, as

### Generated by gibo (https://github.com/simonwhitaker/gibo
### Python

{Boilerplate contents}


### Python



Unknown Argument: Python
### VisualStudioCode



### VisualStudioCode

{Boilerplate contents}


Unknown argument: VisualStudioCode
### Windows



### Windows

{Boilerplate contents}


Unknown Argument:Windows

OS: Windows 11 21H2 (Build 22000.588)
Gibo: 2.2.6 through scoop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.