Skip to content

Instantly share code, notes, and snippets.

@d-kuro
Last active February 14, 2019 06:25
Show Gist options
  • Save d-kuro/d0c5cfce385f3959bc77102f04a5a8f1 to your computer and use it in GitHub Desktop.
Save d-kuro/d0c5cfce385f3959bc77102f04a5a8f1 to your computer and use it in GitHub Desktop.
fish 導入

fish 導入

インストール

$ brew install fish
$ fish -v
fish, version 3.0.0

デフォルトシェルを変更する

$ echo /usr/local/bin/fish | sudo tee -a /etc/shells
Password:
/usr/local/bin/fish

$ chsh -s /usr/local/bin/fish
Changing shell for hoge.
Password for hoge:

ターミナルを再起動する

設定変更

以下のコマンドでブラウザから設定変更できる。

$ fish_config

fisherman

fish 用のプラグインマネージャ

$ curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs git.io/fisherman

テーマ変更

$ fisher git_util
Installing 1 plugin/s
OK Fetch git_util github.com/fisherman/git_util
Done in 2s 16ms

pre を入れる

$ fisher rafaelrinaldi/pure
Installing 1 plugin/s
OK Copy pure
Done in 525ms

config

fish.rc はないらしい ~/.config/fish/config.fish が本体 export が使えないらしいので set を使う

#
set PATH /usr/local/bin $PATH

この辺をセットした

# ls エイリアス
alias ls 'ls -aG'

# PATH
set -x PATH /usr/local $PATH
set -x PATH /usr/local/bin $PATH

# export
set -x GREP_OPTIONS "--color=always"
set -x LANG "ja_JP.UTF-8"

# fish theme pure
set -x pure_symbol_prompt ">"

# golang
set -x GOPATH $HOME/go
set -x PATH $GOPATH/bin $PATH

## goenv
set -x PATH $HOME/.goenv/bin $PATH
eval (goenv init - | source)

Alacritty

iTeam2 より GPU レンダリングで早いらしい Rust 製

インストール

README 通りにやっていく

$ brew cask install alacritty

ghq で clone もする

$ ghq get https://github.com/jwilm/alacritty.git
$ ghq look github.com/jwilm/alacritty

Manual Page

sudo mkdir -p /usr/local/share/man/man1
gzip -c alacritty.man | sudo tee /usr/local/share/man/man1/alacritty.1.gz > /dev/null

Shell completions

fish 用

sudo cp alacritty-completions.fish $__fish_datadir/vendor_completions.d/alacritty.fish

って書いてあるけど fish 3.0 で $__fish_data_dir に変わったっぽい

$ echo $__fish_data_dir
/usr/local/Cellar/fish/3.0.0/share/fish

のでこっち

sudo cp alacritty-completions.fish $__fish_data_dir/vendor_completions.d/alacritty.fish

Terminfo

sudo tic -e alacritty,alacritty-direct alacritty.info

サイズ変更

~/.config/alacritty/alacritty.yml を編集

window:
  # Window dimensions (changes require restart)
  #
  # Specified in number of columns/lines, not pixels.
  # If both are `0`, this setting is ignored.
  dimensions:
    columns: 150
    lines: 40

おまけ

ハマったのでこれも設定しよう

#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use 'alacritty' if it is
# available, otherwise 'xterm-256color' is used.
#TERM: xterm-256color
env:
  TERM: xterm-256color