10

I'd like to be able to do the following in the search box:

shell [cmd] [-linux]

to search for "questions containing the 'shell' term AND having the 'cmd' tag AND NOT having the 'linux' tag"

Note that "shell" is not a TAG !

3
  • 1
    Dupe: meta.stackexchange.com/questions/16462/…
    – random
    Commented Aug 26, 2009 at 11:32
  • It is not a duplicate, as I want to be able to do a keyword+tags search, not only tags
    – drAlberT
    Commented Aug 26, 2009 at 11:57
  • Okay, then quote the terms and bracket the tags
    – random
    Commented Aug 26, 2009 at 12:10

2 Answers 2

12

You can if you precede the tag in the search with a minus (-):

shell [cmd] -[linux]

The following links pop for searches across the SOFU for questions that mention shell tagged but not tagged .

StackOverflow: https://stackoverflow.com/search?q=shell+%5Bcmd%5D+-%5Blinux%5D

ServerFault: https://serverfault.com/search?q=shell+%5Bcmd%5D+-%5Blinux%5D

SuperUser: https://superuser.com/search?q=shell+%5Bcmd%5D+-%5Blinux%5D

2
  • I think the minus sign should be outside the brackets, Is it right? I tried and it is the solution. OK
    – drAlberT
    Commented Aug 26, 2009 at 14:01
  • Logically it would be on the outside, but within the brackets, it keeps that part of the query as a tag.
    – random
    Commented Aug 26, 2009 at 14:09
2

As workaround you can set linux to your ignore list temporarily (or permanently, if you don't like it at all).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .