Don't try make first argument the command, the vim plugin mixes up commands with options

This commit is contained in:
Shaun Sharples 2014-08-20 13:21:31 +02:00
parent c9dd66fde6
commit e3e4f26b1d

View File

@ -35,17 +35,13 @@ cabal.mkDerivation (self: {
mv $out/bin/ghc-mod $out/bin/.ghc-mod-wrapped
cat - > $out/bin/ghc-mod <<EOF
#! ${self.stdenv.shell}
COMMAND=\$1
shift
eval exec $out/bin/.ghc-mod-wrapped \$COMMAND \$( ${self.ghc.GHCGetPackages} ${self.ghc.version} | tr " " "\n" | tail -n +2 | paste -d " " - - | sed 's/.*/-g "&"/' | tr "\n" " ") "\$@"
eval exec $out/bin/.ghc-mod-wrapped \$( ${self.ghc.GHCGetPackages} ${self.ghc.version} | tr " " "\n" | tail -n +2 | paste -d " " - - | sed 's/.*/-g "&"/' | tr "\n" " ") "\$@"
EOF
mv $out/bin/ghc-modi $out/bin/.ghc-modi-wrapped
cat - > $out/bin/ghc-modi <<EOF
#! ${self.stdenv.shell}
COMMAND=\$1
shift
eval exec $out/bin/.ghc-modi-wrapped \$COMMAND \$( ${self.ghc.GHCGetPackages} ${self.ghc.version} | tr " " "\n" | tail -n +2 | paste -d " " - - | sed 's/.*/-g "&"/' | tr "\n" " ") "\$@"
eval exec $out/bin/.ghc-modi-wrapped \$( ${self.ghc.GHCGetPackages} ${self.ghc.version} | tr " " "\n" | tail -n +2 | paste -d " " - - | sed 's/.*/-g "&"/' | tr "\n" " ") "\$@"
EOF
chmod +x $out/bin/ghc-mod