代码之家  ›  专栏  ›  技术社区  ›  user1869582

我想循环浏览选项卡完成结果

  •  1
  • user1869582  · 技术社区  · 8 年前

    我有一个bash命令,它将循环遍历选项卡完成后列出的结果。 cshrc有这样的东西吗? 我想映射ctrl键和d键以循环浏览我的选项 谢谢

    1 回复  |  直到 8 年前
        1
  •  1
  •   Martin Tournoij ravi.zombie    8 年前

    我想你想要 complete-word-fwd 命令

    从手册页:

       complete-word-fwd (not bound)
               Replaces the current word with the first word in  the  list  of
               possible completions.  May be repeated to step down through the
               list.  At the end of the list, beeps and reverts to the  incom‐
               plete word.
    

    如您所见,它在默认情况下没有绑定,但您可以将其绑定到 ^D 与:

    bindkey ^D complete-word-fwd
    

    还有 complete-word-back .