V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
jokeface
V2EX  ›  程序员

想统计下大家在 shell 里都是怎么做 auto complete 的?

  •  
  •   jokeface · Mar 13, 2023 · 4613 views
    This topic created in 1141 days ago, the information mentioned may be changed or developed.
    1. fig
    2. omz autocomplete
    3. warp
    4. 还有啥推荐的吗
    19 replies    2024-06-10 23:41:24 +08:00
    deepen
        1
    deepen  
       Mar 13, 2023
    securityCoding
        2
    securityCoding  
       Mar 13, 2023 via Android
    copilot
    jokeface
        3
    jokeface  
    OP
       Mar 13, 2023
    @deepen 我想实现一些比如参数和 subcommand 的提醒和补全
    0attocs
        4
    0attocs  
       Mar 14, 2023
    @jokeface 这方面 PowerShell (pwsh7) 很好用,参数只需要 prefix 匹配,比如-Directory 可以简写为-d ,-di ,-dir ;官方的 PSReadLine 可以 tab 自动补全 /选择参数,第三方 PSFzf 可以实现模糊搜索历史命令。

    不过我只在 Windows 下用 pwsh 作为默认 shell ,Linux 下只用 pwsh 写脚本(类似 Python ),因为不太确定各种环境变量的支持如何。而且 pwsh 的迭代也很快,Linux 下行为不一定稳定( imo )。
    sky96111
        5
    sky96111  
       Mar 14, 2023 via Android   ❤️ 3
    fish
    webcape233
        6
    webcape233  
       Mar 14, 2023 via iPhone
    zsh 加上插件就够了
    vyron
        7
    vyron  
       Mar 14, 2023
    Kobayashi
        8
    Kobayashi  
       Mar 14, 2023
    需要自己写补全文件。fig, warp 只是将 shell 补全换了一种方式展示而已。
    tool2d
        9
    tool2d  
       Mar 14, 2023
    我是用 GUI 管理一大堆命令,然后快捷方式把文本自动注入 shell 里的。

    对我个人来说,重复输入命令是很麻烦的事情。又不能写成.sh 文件,因为命令的参数每次都会有微调,无法固定。

    唯一选择就只有外部 GUI 辅助管理了。
    a33291
        10
    a33291  
       Mar 14, 2023
    试试 nushell
    xidaduo
        11
    xidaduo  
       Mar 14, 2023
    warp 非常智能,对我来说很够用,主力 terminal
    ispinfx
        12
    ispinfx  
       Mar 14, 2023
    TAB
    356693212
        13
    356693212  
       Mar 14, 2023
    warp
    xiangagou
        14
    xiangagou  
       Mar 14, 2023
    zsh4human,帮你配置好了
    Mashirobest
        15
    Mashirobest  
       Mar 14, 2023
    zsh 用 zsh-autosuggestions ,不过懒人可以试试 fish ,基本开箱即用
    zhuisui
        16
    zhuisui  
       Mar 14, 2023
    zsh + fzf-tab
    Desdemor
        17
    Desdemor  
       Mar 14, 2023
    zsh +1
    wenyuan5
        18
    wenyuan5  
       Mar 15, 2023
    prezto + 插件
    alanhe421
        19
    alanhe421  
       Jun 10, 2024
    @deepen autocompletion 与 autosuggestion 不一回事。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5063 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 68ms · UTC 05:38 · PVG 13:38 · LAX 22:38 · JFK 01:38
    ♥ Do have faith in what you're doing.