From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 87A066DE0AF4 for ; Sat, 22 Oct 2016 12:00:20 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.227 X-Spam-Level: X-Spam-Status: No, score=-0.227 tagged_above=-999 required=5 tests=[AWL=-0.207, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x0XBMED-3v3o for ; Sat, 22 Oct 2016 12:00:20 -0700 (PDT) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by arlo.cworth.org (Postfix) with ESMTPS id A3F446DE02DA for ; Sat, 22 Oct 2016 12:00:19 -0700 (PDT) Received: by mail-lf0-f68.google.com with SMTP id n3so472486lfn.0 for ; Sat, 22 Oct 2016 12:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=ojNSVk79sXPgj5ylveaYpqLzebNWYZHS6e2//xk1MQY=; b=PeCXyKIejEPXE8Fs5mYpXuglZ0zMbJ3Gpa6DY9MVXdQwB6H1gzUP5UyIOxufXQbfdW MhF8hoQLtldDjpza2A1SnGLV3TVXpp7uTDXIi4+hmp2UYA7qC0mtOujyYKcxnnBBnRpT 5cgiA2IcmnxV6k6GTz/B3u8jbYyHGay6Lo5+iWgdrBC/Ymk8qmF6nIhjXK5NIhqgXf1Y AZFuaT5tANaHriSRwiMFyGi7AcEX/IYeItgbUZmur6l6fhkMNmUQ5rtMwANNZcCuPsQQ nsTNluiWCoYUBdu2ReiIKm3u7kcvvGjq2jJ6yNCZuU3ANMEu4Fs9mbMEPuSmrH2bwJm1 GL2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=ojNSVk79sXPgj5ylveaYpqLzebNWYZHS6e2//xk1MQY=; b=MwekBQD7ohaBvULLItygeh6edLYQVrJIdXr5yDg0caBK1G4hn2t/8lD9sOCTRJh73K z3uCSvWiEGGipb2vjwx9GVDNZJvsCNmbSyAE6DjMG61VAY7ZRgHXSrgr/QW/zDGPj+71 6wDCnlxw4M4KzSuVUducltSqTkOpprKNh1OFnM0ndLX/Pmk4f35jbiW7iAWTFl1h33GR X/kkgfXpFocPzWLyC5QBtWYDFz+TkZeJFUO4koI9RMXFsIm3859g3/33nB0EpJ3zEDie QFr0AMzLZvE4xrRjTMnXpI/8Bs0YEpYWqIDkQkJAIeLZxxsIxqZxTihJ8O3/Rmzvx20R ZxNw== X-Gm-Message-State: ABUngvcFrcphD08ZNoMx83XGT78SZzKaC4ai2hJ9hq9fvWFffH3nQaeJvoGB9Z6fxvNjFg== X-Received: by 10.25.133.11 with SMTP id h11mr3320271lfd.60.1477162817826; Sat, 22 Oct 2016 12:00:17 -0700 (PDT) Received: from localhost (mobile-access-bceef0-89.dhcp.inet.fi. [188.238.240.89]) by smtp.gmail.com with ESMTPSA id 144sm1540773ljf.6.2016.10.22.12.00.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Oct 2016 12:00:17 -0700 (PDT) From: Jani Nikula To: Keith Amidon , Mark Walters , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: add mimetype completions to searches In-Reply-To: <1477159723.20927.5.camel@picnicpark.org> References: <1474968416-3572-1-git-send-email-markwalters1009@gmail.com> <871sz8zp1e.fsf@nikula.org> <1477159723.20927.5.camel@picnicpark.org> Date: Sat, 22 Oct 2016 21:58:26 +0300 Message-ID: <87a8dwyzvx.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2016 19:00:20 -0000 On Sat, 22 Oct 2016, Keith Amidon wrote: > On Sat, 2016-10-22 at 12:55 +0300, Jani Nikula wrote: >> Any ideas how to get a list of mime types in shell, so I could do the >> same in bash completion without hard-coding some limited list? > > Not sure if this is really what you're looking for, but on my archlinux > system, the file /etc/mime.types is installed by a package called mime- > types, which lists this gentoo package as its upstream: > > http://packages.gentoo.org/package/app-misc/mime-types > > It's pulled in as a dependency of installing firefox, so presumably > some version of this is pretty ubiquitous on Linux systems. Thanks. I did look at it before, but dismissed it because the package doesn't seem to provide a tool for parsing the file. I ended up parsing it using a sed one-liner [1]. Oh well. BR, Jani. [1] id:1477162534-7814-1-git-send-email-jani@nikula.org