Skip to content

skywind3000/tcz_cd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Preface

A fuzzy cd command for Total Commander by learning your habit.

Features

tcz_cd can study the directory history in TC and helps you change directory rapidly with a fuzzy finder:

Possibilities:

  • Jump in history directories (aka, Most Recently Used dirs).
  • Jump in project directories.
  • Jump forward.
  • Jump backward.

Requirements

Install one of the supported fuzzy finders (peco, gof and fzf) in your windows:

scoop install peco

peco and gof are recommended because fzf cannot display wide unicode characters correctly in Windows.

Installation

Copy tcz_cd.py into one of the subdirectory:

cd totalcmd
mkdir tools
copy /path/to/tcz.py tools

The commands above will copy tcz.py into %COMMANDER_PATH%\tools.

Edit your usercmd.ini and add the following code:

[em_tcz_mru]
cmd=%COMMANDER_PATH%\tools\tcz_cd.py
param=-m

[em_tcz_forward]
cmd=%COMMANDER_PATH%\tools\tcz_cd.py
param=-f

[em_tcz_backward]
cmd=%COMMANDER_PATH%\tools\tcz_cd.py
param=-b

[em_tcz_project]
cmd=%COMMANDER_PATH%\tools\tcz_cd.py
param=-p

[em_tcz_root]
cmd=%COMMANDER_PATH%\tools\tcz_cd.py
param=-r

After this, you can try em_tcz_mru in TC's command line. If it works correctly, assign a keymap for these commands, edit wincmd.ini:

[Shortcuts]
A+L=em_tcz_mru
A+P=em_tcz_forward

Usage

Type em_tcz_mru in your tc's command line:

Press ENTER and fuzzy finder peco will display:

Try to input something, press ENTER to accept, ESC to give up and CTRL+J/K to move cursor up and down.

Once a candidate is accepted by ENTER, it will tell tc to change the current directory to the destination.

Credit

Tornado

Releases

No releases published

Packages

No packages published

Languages