packages feed

cli-setup 0.2.1.2 → 0.2.1.3

raw patch · 4 files changed

+23/−25 lines, 4 filesdep −bytestringdep −file-embedPVP ok

version bump matches the API change (PVP)

Dependencies removed: bytestring, file-embed

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # cli-setup +# 0.2.1.3++  * Remove dependency on `file-embed`+ # 0.2.1.2    * Install to `/usr/local/share/man/man1` on Mac
cli-setup.cabal view
@@ -1,6 +1,6 @@ cabal-version:      1.18 name:               cli-setup-version:            0.2.1.2+version:            0.2.1.3 license:            BSD3 license-file:       LICENSE copyright:          Copyright: (c) 2018-2019 Vanessa McHale@@ -12,10 +12,7 @@  category:           Development, Command Line Tools build-type:         Simple-extra-source-files:-    cabal.project-    py/optparse-applicative.py-+extra-source-files: cabal.project extra-doc-files:     README.md     CHANGELOG.md@@ -37,9 +34,7 @@     build-depends:         base >=4.6 && <5,         directory -any,-        process >=1.4.0.0,-        bytestring -any,-        file-embed >=0.0.9+        process >=1.4.0.0      if flag(development)         ghc-options: -Werror
− py/optparse-applicative.py
@@ -1,15 +0,0 @@-import re-from thefuck.utils import replace_argument--def match(command):-    return ('Did you mean this?' in command.output and 'Invalid argument' in command.output)--def get_new_command(command):-    broken = command.script_parts[1]-    fix = re.findall(r'    ([a-zA-z]*)', command.output)[0]--    return replace_argument(command.script, broken, fix)--enabled_by_default = True--priority = 100
src/Distribution/CommandLine.hs view
@@ -12,14 +12,28 @@  import           Control.Applicative import           Control.Monad       (unless, void, when)-import           Data.FileEmbed      (embedStringFile) import           System.Directory    (createDirectoryIfMissing, doesDirectoryExist, doesFileExist) import           System.Environment  (lookupEnv) import           System.Info         (os) import           System.Process      (readCreateProcessWithExitCode, shell)  rules :: String-rules = $(embedStringFile "py/optparse-applicative.py")+rules =+    "import re\n" +++    "from thefuck.utils import replace_argument\n" +++    "\n" +++    "def match(command):\n" +++    "    return ('Did you mean this?' in command.output and 'Invalid argument' in command.output)\n" +++    "\n" +++    "def get_new_command(command):\n" +++    "    broken = command.script_parts[1]\n" +++    "    fix = re.findall(r'    ([a-zA-z]*)', command.output)[0]\n" +++    "\n" +++    "    return replace_argument(command.script, broken, fix)\n" +++    "\n" +++    "enabled_by_default = True\n" +++    "\n" +++    "priority = 100"  -- | Write a set of rules based on -- [optparse-applicative](http://hackage.haskell.org/package/optparse-applicative)