ignore: Handle ignore files of different VCSes

[ bsd3, library, program, system ] [ Propose Tags ]

Library and tiny tool for working with ignore files of different version control systems


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.1.0
Dependencies base (>=4 && <5), directory (>=1.2.1.0), Glob (>=0.7), ignore, mtl (>=2.1.3.1), path (>=0.5.1), pcre-heavy (>=0.2), text (>=1.2.0.4) [details]
License BSD-3-Clause
Copyright (c) 2015 Alexander Thiemann
Author Alexander Thiemann <mail@athiemann.net>
Maintainer Alexander Thiemann <mail@athiemann.net>
Category System
Home page http://github.com/agrafix/ignore
Source repo head: git clone https://github.com/agrafix/ignore
Uploaded by AlexanderThiemann at 2015-08-22T17:46:22Z
Distributions
Reverse Dependencies 1 direct, 4 indirect [details]
Executables ignore
Downloads 2098 total (6 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-08-22 [all 1 reports]

Readme for ignore-0.1.0.0

[back to package description]

ignore

Build Status

Intro

Hackage: ignore

Library and tiny tool for working with ignore files of different version control systems.

Library Usage

module Main where

import Ignore

import Path
import System.Environment
import System.Directory

main :: IO ()
main =
    do dir <- getCurrentDirectory >>= parseAbsDir
       ignoreFiles <- findIgnoreFiles [VCSGit, VCSMercurial, VCSDarcs] dir
       checker <- buildChecker ignoreFiles
       case checker of
           Left err -> error err
           Right (FileIgnoredChecker isFileIgnored) ->
           	  putStrLn $ 
           	    "Main.hs is " 
           	    ++ (if isFileIgnored "Main.hs" 
           	        then "ignored" else "not ignored")

Commandline Usage

Run in any project under version control to check if a file is ignored or not.

$ ignore foo~ dist/bar distinct
File foo~ IGNORED
File dist/foo IGNORED
File distinct not ignored

Install

  • Using cabal: cabal install ignore
  • From Source: git clone https://github.com/agrafix/ignore.git && cd ignore && cabal install
  • Using stack: git clone https://github.com/agrafix/ignore.git && cd ignore && stack build