快速跳转工具--FASD 简单介绍
前言fasd是一个命令行加速工具。它提供了对文件和文件夹的快速访问。它和autojmp,z,v都很相近。它会记录你访问过的文件夹和文件, 然后你就可以通过简短的名字来直接访问它们。 命令fasd [options] [query ...] [f|a|s|d|z] [opions] [query ...] options: -s list paths with scores -l list paths without scores -i interactive mode -e <cmd> set command to execute on the result file -b <name> only use <name> backend -B <name> add additional backend <name> -a match files and directories -d match directories only -f match files only -r match by rank only -t match by recent access only -R reverse listing order -h show a brief help message -[0-9] select the nth entry fasd [-A|-D] [paths ...] -A add paths -D delete paths 比如输入 $ fasd -R 75.3984 /home/harriszh/dw/dev/dw_fp_mult/src 63.423 /home/harriszh/dw/work_version/sim_ver.2015 44.8636 /home/harriszh/avip/axi3_master_tlm_slave_tlm 43.8288 /home/harriszh/.fzf 37.4402 /home/harriszh/.zshrc 35.572 /home/harriszh/dw/dev/dw_fp_mult 26.0366 /home/harriszh/.fzf/shell 25.6842 /home/harriszh/.vim/bundle ... 配置ZSH: # fasd fasd_cache="$HOME/.fasd-init-zsh" if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install >| "$fasd_cache" fi source "$fasd_cache" unset fasd_cache BASH: fasd_cache="$HOME/.fasd-init-bash" if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then fasd --init posix-alias bash-hook bash-ccomp bash-ccomp-install >| "$fasd_cache" fi source "$fasd_cache" unset fasd_cache aliases带自以下aliases alias a='fasd -a' # any 使用使用如下: # list frecent files matching foo f foo # list frecent files and directories matching foo and bar a foo bar # list frecent files that ends in js f js$ # run vim on the most frecent file matching foo f -e vim foo # run mplayer on the most frecent file matching bar mplayer `f bar` # cd into the most frecent directory matching foo z foo # interact open `sf pdf` 问题在zsh里配合fzf使用时经常会出现这个错误
这时应该检查一下fasd有没有被其它脚本alias 后言fasd单独使用也非常强大,但配合fzf会再强大,所以fasd只是三剑客之一,另外两剑客是ag和fzf. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |