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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址