LoginSignup
0
0

More than 3 years have passed since last update.

alias の中身を調べる

Posted at

やりたいこと

alias で実際に実行されているコマンド本体が知りたい

いつもは alias で実行しているけど、
「あれ、実体って何やってるんだっけ」
みたいになることがあるので、それをぱぱっと調べたい

方法

type なんとか でできるらしい

> type {alias}

実行例

> type gcd
type gcd
gcd is a function with definition
# Defined in - @ line 1
function gcd --wraps='cd (ghq root)/(ghq list | fzf)' --description 'alias gcd=cd (ghq root)/(ghq list | fzf)'
  cd (ghq root)/(ghq list | fzf) $argv;
end

(いつもこれでリポジトリの移動をしてる)

alias が登録されていなかったら

これも便利

> type git
git is /usr/bin/git

参考

0
0
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
0
0