• 请不要在回答技术问题时复制粘贴 AI 生成的内容
jokeface
V2EX  ›  程序员

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

  •  
  •   jokeface · Mar 13, 2023 · 5391 views
    This topic created in 1330 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
    deepen
    Mar 13, 2023
    1
    securityCoding
    securityCoding
    Mar 13, 2023 via Android
    2
    copilot
    jokeface
    jokeface
    OP
    Mar 13, 2023
    3
    @deepen 我想实现一些比如参数和 subcommand 的提醒和补全
    0attocs
    0attocs
    Mar 14, 2023
    4
    @jokeface 这方面 PowerShell (pwsh7) 很好用,参数只需要 prefix 匹配,比如-Directory 可以简写为-d ,-di ,-dir ;官方的 PSReadLine 可以 tab 自动补全 /选择参数,第三方 PSFzf 可以实现模糊搜索历史命令。

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

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

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