pindexis / marker

The terminal command palette
MIT License
2.02k stars 106 forks source link

marker doesn't work well with aliased grep commands #25

Open langston-barrett opened 8 years ago

langston-barrett commented 8 years ago

Every time I use ctrl+t, I get the following error message, which prevents me from further editing the current command line:

grep: conflicting matchers specified

I'm on marker commit 9bd181db2f6e10d9d74b45cbc00ab3553fe89c4a, with zsh version 5.2.

aabs commented 8 years ago

I have a similar issue. When I hit \C-t I get something like this:

brew search {{text}}usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
    [-e pattern] [-f file] [--binary-files=value] [--color=when]
    [--context[=num]] [--directories=action] [--label] [--line-buffered]
    [--null] [pattern] [file ...]

Running this on ZSH on OSX 10.11 El Capitan

pindexis commented 7 years ago

This happens because grep -P does not work on new OSX. I've updated it to a perl call instead. Let me know if this doesn't fix the issue(I don't have OSX here)

langston-barrett commented 7 years ago

@pindexis I don't think that's my problem since I'm on Arch Linux :-)

$ grep --version
grep (GNU grep) 2.25
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
pindexis commented 7 years ago

Maybe you're aliasing grep into your .zshrc. do you have the same problem when using bash(or on a clean .zshrc)

langston-barrett commented 7 years ago

@pindexis You're right, I don't have the same problem in bash (where I don't alias grep). My alias for grep is pretty useful though, and I'd like to keep it. Is there a way to make marker work well with aliases?

alias grep='grep -E --color=always --exclude-dir=.git --exclude-dir=vendor --exclude-dir=Godeps --exclude-dir=.cabal-sandbox --exclude-dir=.tox'