xcd-go

command module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 7 Imported by: 0

README

xcd-go

GitHub Release GitHub go.mod Go version

eXplore and Change Directory - rewritten in Go

概要

ディレクトリの確認と移動が同時に行えるCLIツールです。

元々シェルスクリプト製だったxcdをGoで書き直してスムーズに動作するように改善しました。

20240425_050115

インストール

[!IMPORTANT] Go 1.22+ が必要です

go install github.com/saka-naname/xcd-go@latest

上記のコマンドを実行後、使用しているシェルに応じて次の設定を行ってください。

Bash

~/.bashrc に以下の文を追記してください。

function xcd() {
    cd $($(go env GOPATH)/bin/xcd-go $@)
}
zsh

~/.zshrc に以下の文を追記してください。

function xcd() {
    cd $($(go env GOPATH)/bin/xcd-go $@)
}

操作方法

  • : 項目の選択
  • : 選択中のディレクトリを開く
  • : 1階層上のディレクトリへ
  • Enter : 移動先のディレクトリを確定 (終了)
  • q : キャンセルして終了

今後やりたいこと

  • 画面下部に操作や各種情報を表示したい
  • オプションからパスを指定して好きなディレクトリから探索できるように
  • 見た目をもう少しリッチにしたい
  • シンボリックリンクへの対応
  • 検索(フィルタ)機能の実装

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL