muttサイドバー:フォルダの展開/縮小

muttサイドバー:フォルダの展開/縮小

サイドバーで単一のフォルダまたはすべてのフォルダを展開または縮小する方法はありますかmutt-patched?サイドバーでこれに関する情報が見つかりません。文書

ベストアンサー1

実際、私は設定ファイルを使ってこれを達成する方法を知っています。

maildirs ディレクトリ構造は次のとおりです。

~/Mail/
├── account1
│   ├── INBOX
│   │   ├── cur
│   │   ├── new
│   │   └── tmp
│   ├── cur
│   ├── drafts
│   │   ├── cur
│   │   ├── new
│   │   └── tmp
│   ├── new
│   ├── sent
│   │   ├── cur
│   │   ├── new
│   │   └── tmp
│   ├── spam
│   │   ├── cur
│   │   ├── new
│   │   └── tmp
│   └── tmp
└── account2
    ├── INBOX
    │   ├── cur
    │   ├── new
    │   └── tmp
    ├── cur
    ├── drafts
    │   ├── cur
    │   ├── new
    │   └── tmp
    ├── new
    ├── sent
    │   ├── cur
    │   ├── new
    │   └── tmp
    ├── spam
    │   ├── cur
    │   ├── new
    │   └── tmp
    └── tmp

Mutt/Neomutt 構成例 (両方とも機能する必要があります)

# some basic configuration
set folder = ~/Mail
set sidebar_sort_method=alpha
set sidebar_indent_string="  "
set sidebar_folder_indent=yes

# initial mailboxes config
mailboxes `find ~/Mail -type d -mindepth 1 -maxdepth 1 | xargs`

# folder hooks for account1
folder-hook account1$ "unmailboxes *"
folder-hook account1$ "mailboxes `find /tmp/Mail -type d -mindepth 1 -maxdepth 1 | xargs`"
folder-hook account1$ "mailboxes `find /tmp/Mail/account1 -type d -mindepth 1 -maxdepth 1 -not -name 'new' -not -name 'cur' -not -name 'tmp' | xargs`"

# folder hooks for account2
folder-hook account2$ "unmailboxes *"
folder-hook account2$ "mailboxes `find /tmp/Mail -type d -mindepth 1 -maxdepth 1 | xargs`"
folder-hook account2$ "mailboxes `find /tmp/Mail/account2 -type d -mindepth 1 -maxdepth 1 -not -name 'new' -not -name 'cur' -not -name 'tmp' | xargs`"

# macro to display all mailboxes
macro index,pager <f5> "<enter-command>mailboxes `find ~/Mail -mindepth 1 -maxdepth 2 -type d -not -name 'new' -not -name 'cur' -not -name 'tmp' | xargs`<enter>"
  • neomuttを起動すると、アカウントのみが表示されます。
  • アカウントのメールを入力すると、選択したアカウントに属するサブメールボックスとは異なるアカウント名のみが表示されます(サブメールボックスを除く)。
  • すべてのメールボックスを表示するために、次のマクロを用意しました。F5

ASCIIブロードキャスト

おすすめ記事