basyura's blog

あしたになったらほんきだす。

2021-12-11から1日間の記事一覧

zsh - 雑に補完してディレクトリ移動

zsh

function repos { if [[ $1 = "" ]] ; then cd ~/repos return fi cd ~/repos/$1 } function _repos { local allfiles=`find ~/repos/* -type d -maxdepth 0 -exec basename '{}' ';'` local array=(${(f)allfiles}) _describe -t commands "Projects" array…