LoginSignup
1
1

More than 5 years have passed since last update.

[WIP]zshで個人的自作コマンドを作る備忘録

Posted at

blogcommand.png

1. やりたいこと

最終的にはtmuxを起動するときに、
既存のセッションが無い場合は
新規でセッションを開始

既存があるばあいは
一覧を表示して
開くセッションを指定できるようにしたい

作業環境

  • xUbuntu-16.04.1(x86_64)
  • zsh-5.1.1
  • tmux-2.1

まずはコマンド自作

全くの初心者なのでまずはここから
参考:
引数を処理する | UNIX & Linux コマンド・シェルスクリプト リファレンス
zsh の補完関数の自作導入編

.zshrc
function hoge (){
    echo "$0"
}
zsh
$ hoge
hoge
1
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
1
1