---
title: "ターミナルがダサいとモテない。macOSのbashでflylineを使う編。 | grasys blog"
url: "https://blog.grasys.io/post/yusukeh/terminal-flyline/"
description: "macOSにflylineを入れてHomebrewのbashで有効化しました。インストール、.bashrcの設定、WezTermでのコマンド補完画面と、しばらく使ってみた感想を紹介します。"
---

# ターミナルがダサいとモテない。macOSのbashでflylineを使う編。

-   ![](/_astro/noicon.CTHOhNiB_1HMs6A.webp)[yusukeh](/authors/yusukeh/)
-   公開日：2026年8月26日
-   カテゴリー：[Tech](/categories/tech/)
-   タグ：[#シリーズ: ターミナル環境](/tags/シリーズ-ターミナル環境/)[#flyline](/tags/flyline/)[#bash](/tags/bash/)[#macOS](/tags/macos/)

![ターミナルがダサいとモテない。macOSのbashでflylineを使う編。](/_astro/hero.DgbhtHl3_Z1NXMc9.webp)

自分はbashを使っています。

macOSでbashって言うと「zshじゃないの？」と聞かれそうですが、ずっとbashです🤣

今回はTerminalをもう一段うるさくしてくれる[flyline](https://github.com/HalFrgrd/flyline)を入れていきます。

前に書いた[TabbyでQuake mode](https://blog.grasys.io/post/yusukeh/terminal-tabby-quake-mode/)でも少し触れましたが、最近は[Starship](https://starship.rs/)とflylineを組み合わせています。

## flyline

[flyline](https://github.com/HalFrgrd/flyline)はbashのline editingをモダンにしてくれるpluginです。

bashがコマンド入力に使っているreadlineを置き換えて、こんな機能を追加してくれます。

-   Intellisenseっぽいコマンド補完
-   入力中のsyntax highlighting
-   fuzzyなhistory検索
-   括弧やquoteのauto close
-   mouseでのcursor移動や候補選択
-   AI Agentを使ったコマンド生成
-   右promptやanimationを含むrich prompt

[ble.sh](https://github.com/akinomyoga/ble.sh)に近い存在ですが、flylineはRustで書かれていて、bashと同じprocessの中で動きます。

自分はbashを使い続けたいけど、入力体験はモダンにしたいので気になって使い始めました。

## Install

macOS標準のbashは古く、custom builtinsを使うflylineをloadできません。

まずはHomebrewで新しいbashを入れます。

Bashcontent\_copy

```
brew install bash
```

自分の環境ではこんな感じです。

Plain textcontent\_copy

```
GNU bash, バージョン 5.3.15(1)-release (aarch64-apple-darwin25.4.0)
```

### Homebrewのbashをlogin shellにする

Homebrewで入れたbashをmacOSのlogin shellとして使う場合は、`/etc/shells`へ追加してから`chsh`します。

Bashcontent\_copy

```
BREW_BASH="$(brew --prefix)/bin/bash"
grep -Fxq "${BREW_BASH}" /etc/shells || echo "${BREW_BASH}" | sudo tee -a /etc/shells
chsh -s "${BREW_BASH}"
```

設定後は新しいTerminalを開いて確認します。

Bashcontent\_copy

```
echo "${SHELL}"
bash --version
```

Apple Siliconの自分の環境では`/opt/homebrew/bin/bash`になっています。

## flylineを入れる

公式のquick installを使いました。

Bashcontent\_copy

```
curl -sSfL https://github.com/HalFrgrd/flyline/releases/latest/download/install.sh | sh
```

このinstallerはflylineをdownloadして、`.bashrc`からloadする設定も追加してくれます。

自分はdotfilesを[chezmoi](https://www.chezmoi.io/)で管理しているので、installer任せにはせず`.bashrc`側の設定をtemplateにしています。

macOSでは`${HOME}/.local/lib/libflyline.dylib`が配置されました。

## .bashrcで有効化

自分の設定から必要なところを抜き出すとこんな感じです。

Bashcontent\_copy

```
if [[ $- == *i* ]]; then
  if ! type -t flyline >/dev/null 2>&1; then
    enable -f "${HOME}/.local/lib/libflyline.dylib" flyline || true
  fi

  if type -t flyline >/dev/null 2>&1; then
    flyline run-tutorial false

    flyline \
      --send-shell-integration-codes full \
      --enable-extended-key-codes true

    flyline suggestions --auto-suggest true
    flyline editor --auto-close-chars true
    flyline set-style --default-theme dark

    flyline set-cursor \
      --interpolate-easing in-elastic \
      --effect-easing in-elastic \
      --backend flyline \
      --style "reverse"
  fi
fi
```

`enable -f`でdynamic loadしているので、flylineは外部commandではなくbashのbuiltinとして動きます。

Bashcontent\_copy

```
type -t flyline
flyline version
```

Plain textcontent\_copy

```
builtin
flyline 1.6.2
```

まずは公式READMEに書かれているtutorialも一度動かした方がわかりやすいです。

Bashcontent\_copy

```
flyline run-tutorial
```

## WezTermでコマンド補完

新しい[WezTerm](https://wezterm.org/)を開いて`flyline`の後にTabを押してみます。

![WezTermでflylineコマンドの補完候補を表示した画面](/_astro/flyline-command-completion.BhkrY__8_17u9uY.webp)

`flyline <Tab>`でsubcommandやoptionが一覧表示される

bashのcompletionをそのまま活用しつつ、説明付きの候補がpopupします。

候補が多い時は、このまま入力するとfuzzyに絞り込めるのが便利です。

次は`suggestions`の中を見てみます。

![WezTermでflyline suggestionsの補完候補を表示した画面](/_astro/flyline-suggestions-completion.ChaIbGRY_ZuEHjQ.webp)

`flyline suggestions <Tab>`でさらに次の候補を表示

普通のbash completionより情報量が多くて、helpを開かなくてもだいたい何を設定できるかわかります。

`Ctrl+R`のhistory検索もfuzzy searchになり、入力中はsyntax highlightingされます。

括弧やquoteも閉じてくれるので、ShellというよりEditorに近い感じです。

AI Agentへ入力中のcommandを渡す機能もあり、自分はCodexと繋いでいます。

ここまで来るとTerminalは静かにcommandを打つだけの場所ではなくなってきました🤣

mouseのcaptureが合わない場合は無効にもできます。

Bashcontent\_copy

```
flyline mouse --mode disabled
```

## しばらく使ってみた感想

しばらく使っていますが、正直なところ**ちょっと邪魔**です🤣

commandを少し入力しただけで候補がぱっと開くので、画面が忙しくなります。

Starshipのpromptもかなり情報量が多いのに、flylineまで動くとめちゃくちゃうるさいTerminalになります😅

ただ、知らなかったoptionに気がついたり、長いcommandを最後まで入力しなくてよかったり、使っているとちゃんと便利です。

cursorがぬるっと動いたり、補完候補が気持ちよく絞り込まれたり、触っていて楽しいのもあります。

邪魔だなと思う瞬間はあるけど、無いとちょっと寂しい。

ちょっと邪魔だけど、でも楽しんでいます。

しばらくはこのまま使っていこうと思います😆

## Matrix animation

flylineには`--matrix-animation`という面白いoptionもあります。

Bashcontent\_copy

```
flyline --matrix-animation
```

映画『マトリックス』で有名な、緑色の文字が降ってくるdigital rain風のanimationをTerminalの背景に再現できます。

![WezTermの背景でflylineのMatrix animationを表示した画面](/_astro/flyline-matrix-animation.sTo-84JQ_18Yo4A.webp)

`flyline --matrix-animation`でTerminalの背景にdigital rainを表示

値を付けずに実行すると常時表示されます。止める場合は`off`を指定します。

Bashcontent\_copy

```
flyline --matrix-animation off
```

Terminalがさらにうるさくなります🤣

[medium.com/@yusukeh - ターミナルがダサいとモテない。macOSのbashでflylineを使う編。](https://medium.com/@yusuke_h/%E3%82%BF%E3%83%BC%E3%83%9F%E3%83%8A%E3%83%AB%E3%81%8C%E3%83%80%E3%82%B5%E3%81%84%E3%81%A8%E3%83%A2%E3%83%86%E3%81%AA%E3%81%84-macos%E3%81%AEbash%E3%81%A7flyline%E3%82%92%E4%BD%BF%E3%81%86%E7%B7%A8-4432cf065548) の記事を転載しています。

## この記事を書いた人

[![](/_astro/yusukeh.BvUd2yKE_1mQ6Fp.webp)](/authors/yusukeh/)

### [yusukeh](/authors/yusukeh/)

Fly high. Think deep. Move fast. Go far.🦅

-   [X](https://x.com/yusukeh "X")
-   [GitHub](https://github.com/yusukeh "GitHub")
-   [Medium](https://medium.com/@yusukeh "Medium")
-   [Facebook](https://www.facebook.com/yusuke.exzm "Facebook")
-   [Instagram](https://www.instagram.com/yusukehasegawa/ "Instagram")
-   [LinkedIn](https://www.linkedin.com/in/hasegawa-yusuke-091b4164/ "LinkedIn")

[プロフィールと記事一覧](/authors/yusukeh/)