快速跳转工具–FASD 简单介绍

快速跳转工具–FASD 简单介绍前言 fasd 是一个命令行加速工具 它提供了对文件和文件夹的快速访问 它和 autojmp z v 都很相近 它会记录你访问过的文件夹和文件 然后你就可以通过简短的名字来直接访问它们 fasd 会对访问过的文件和文件夹按照使用频率排序 然后按照频率列出所有文件和文件夹安装 gitclonehttp github com clv

前言

安装

git clone https://github.com/clvv/fasd.git cd fasd make install

然后把下面语句放到你的.bashrc或.zshrc下

eval "$(fasd --init auto)"

命令

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 
   
     set command to execute on the result file -b 
    
      only use 
     
       backend -B 
      
        add additional backend 
       
         -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的返回结果是

$ 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

使用

使用如下:

# list recent files matching foo f foo # list recent files and directories matching foo and bar a foo bar # list recent 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_cd:1: maximum nested function level reached

这时应该检查一下fasd有没有被其它脚本alias

后言

fasd单独使用也非常强大,但配合fzf会再强大,所以fasd只是三剑客之一,另外两剑客是riggrep和fzf.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/212399.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月18日 下午8:07
下一篇 2026年3月18日 下午8:08


相关推荐

  • MATLAB 柱状图(Bar) 如何快速更改堆叠图的颜色

    MATLAB 柱状图(Bar) 如何快速更改堆叠图的颜色直接上成图:代码很简单:clearclccloseallX=[8,1,9,3,6,9,3,5,43,2,9,2,6,4,9,5,1];X=X’;color_matrix=[1,1,10.5,0.5,0.5];%%用矩阵存储RGB三色数据,也可以直接赋值h1=bar(X(:,1:2),1);set(h1(1),’facecolor’,color_matrix(1,:))set(h1(2)

    2022年10月18日
    5
  • 华为三层交换机不同vlan互访配置方法_不同交换机vlan间互通

    华为三层交换机不同vlan互访配置方法_不同交换机vlan间互通本次使用ensp模拟器模拟两台华为三层交换机如何配置不同网段不同vlan之间如何互通。网络拓补图如下图所示:IP地址如下:pc1:10.1.1.2/24pc2:10.1.2.2/24pc3:192.168.1.2/24pc4:192.168.2.2/24LSW1配置如下:<Huawei>system-view\\进入系统视图[Huawei]undoinfo-centerenable…

    2025年8月30日
    16
  • navicate 15激活码_在线激活

    (navicate 15激活码)2021最新分享一个能用的的激活码出来,希望能帮到需要激活的朋友。目前这个是能用的,但是用的人多了之后也会失效,会不定时更新的,大家持续关注此网站~IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.html…

    2022年3月27日
    177
  • java 输出水仙花数的代码

    java 输出水仙花数的代码packagecom hanqi publicclasss 输出 100 999 之间的水仙花数 publicstatic String args for inti 1 i lt 10 i

    2026年3月16日
    2
  • vc 调用dll_调用API

    vc 调用dll_调用APIGoogle公司已经将GoogleCOMAPI开放,这样我们就可以通过开放的API来对GoogleEarth进行操作了,比如控制当前视图的高度、中心经纬度,保存当前图片等等。下面是GoogleCOMAPI的网址:http://earth.google.com/comapi/那么,VC程序员如何使用这些API来控制GoogleEarth呢?下面我们编写一个简单的程序来说明对G

    2022年8月12日
    10
  • Seajs使用实例入门

    Seajs使用实例入门1 在项目中引入 sea js 其中内容为 varBASEPATH TestSea function a b functionc a returnfuncti b return toString call b object a functiond returnA functione a if a about blank a wi

    2025年7月13日
    4

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号