Skip to content

note103/choco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 

Repository files navigation

NAME

choco - Move around directories and files intuitively.

DESCRIPTION

直感的な操作でファイル/ディレクトリを操作します。

DEMO

move by peco

choco_peco

move by cho

choco_cho

Installation

  1. Download a repository or the script choco.pl.

  2. Edit .bashrc

function choco {
    local path=$(perl /path/to/choco/choco.pl $@)

    local basename=${path##*/}
    local dirname=""
    if [ -f "$path" ]; then
        dirname="${path%%$basename}"
    elif [ -d "$path" ]; then
        dirname="$path"
    fi
    cd "$dirname"
}
  1. Add alias (example)
# use peco
alias j=choco
alias ja="choco -a"

# use cho
alias s="choco -s cho"
alias sa="choco -s cho -a"

# use peco & open target file
## `open` command is for Mac only.
alias jo="choco -c open"
alias jao="choco -a -c open"

REQUIREMENT

LICENSE

Copyright (C) Hiroaki Kadomatsu.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Hiroaki Kadomatsu (@note103)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages