LoginSignup
2
1

More than 3 years have passed since last update.

[Linux便利コマンド] exaを入れてみる

Posted at

環境

概要

を見て便利なものをどんどん入れてみようということで、まずはexaから。

exaインストール

cargo install exa

と書いてあった。cargo ?? ナニソレ??

ぐぐってみると

Cargoは、Rustのビルドシステム兼、パッケージマネージャです

なるほど。。

いれるのめんどくさかったら辞めよう・・・と思ってみてみたら簡単。

cargoインストール

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

.
.
.

  stable installed - rustc 1.46.0 (04488afe3 2020-08-24)


Rust is installed now. Great!

To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH
environment variable. Next time you log in this will be done
automatically.

To configure your current shell run source $HOME/.cargo/env

.bash_profileに自動でパス通す記述が追加されたっぽい(違うかったら自分で書いてください)

exaインストール

cargo install exa

エイリアス

いままでの手癖でのllなどの入力慣れと、あくまで上位互換のような使い方とするため下記のようにしてみました

if [[ $(command -v exa) ]]; then
  alias ll='exa --icons -la'
  alias l1='exa -1'
  alias lt='exa -Ta --icons -I "node_modules|.git|.cache|vendor|tmp"'
  alias ltl='lt | less -r'
else
  alias ll='ls -la'
  alias l1='ls -1'
  alias lt='tree -I "node_modules|.git|.cache|vendor|tmp"'
  alias ltl='lt | less -r'
fi

まとめ

ちょっとした差ですが、少しずつ良くなることも積み重ねれば大きくなるかなと思うと、継続して取り組んでいきたいと思います。

image.png

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1