Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What are the problem?
@tktcorporation

alias の中身を調べる

やりたいこと

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

参考

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
0
Help us understand the problem. What are the problem?