/
history 명령을 대체하는 mcfly

history 명령을 대체하는 mcfly


Readline 에는 shell history를 검색할수 있는 기능이 있으며 기본 단축 키는 Ctrl-r 로 아래와 같이 예전 명령어를 탐색해서 바로 재사용할 수 있는 편리한 명령어입니다.

mcfly 는 shell history 를 대체할 수 있는 modern 명령어로 더 직관적이고 사용이 편리합니다.

설치

Package Manager 사용

OSX

brew tap cantino/mcfly
brew install mcfly


Source 에서 빌드

Rust 로 개발되었으므로 패키지 관리자보다는 rust 개발 도구를 설치하고 빌드해서 설치하는 것을 권장합니다.

cargo install mcfly


설정

shell 설정

사용하는 쉘의 초기화 파일(Ex: ~/.bash_profile, ~/.zshrc)에 다음 내용을 추가하고 source 명령어로 다시 로딩합니다..


bash

eval "$(mcfly init bash)"


zsh

eval "$(mcfly init zsh)"


fish 

mcfly init fish | source


Settings

Light Mode

export MCFLY_LIGHT=TRUE


Fuzzy searching

export MCFLY_FUZZY=true


Result Counts(기본: 10)

export MCFLY_RESULTS=50


사용

readline 의 reverse search 기능인 Ctrl-r 을 호출하면 mcfly 가 구동됩니다.


상단 검색 창에서 다시 호출할 명령어를 입력하면 하단에 목록과 최근 실행 시간을 표시하며 엔터를 치면 실행해 줍니다.


같이 보기

Ref

Related content

rlwrap - readline 이 적용되지 않은 program 을 위한 wrapper
rlwrap - readline 이 적용되지 않은 program 을 위한 wrapper
More like this
bash 명령어 히스토리 관리 - readline 사용법 및 line 편집, reverse search 등 단축키 요약
bash 명령어 히스토리 관리 - readline 사용법 및 line 편집, reverse search 등 단축키 요약
More like this
bash 에서 readline 기능인 Ctrl-a, Ctrl-e 키가 동작하지 않을 때
bash 에서 readline 기능인 Ctrl-a, Ctrl-e 키가 동작하지 않을 때
More like this
symbolic link 정보를 출력하는 linux readlink 명령어 사용법
symbolic link 정보를 출력하는 linux readlink 명령어 사용법
More like this
bash 자동 완성(auto completion) 기능으로 커맨드라인 생산성 높이기
bash 자동 완성(auto completion) 기능으로 커맨드라인 생산성 높이기
More like this