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

写了一个命令行的 snippet 管理工具

  •  
  •   deepreader · Apr 5, 2017 · 2163 views
    This topic created in 3309 days ago, the information mentioned may be changed or developed.

    https://github.com/idf/snippyt

    Usage:
      snip <snippet>
      snip <snippet> -c <context>
    
    Examples:
      snip helloworld -c "name=World;"
    

    样例

    mkdir ~/.snippyt
    echo "{{ firstname }} {{ lastname }}'s own snippet" > ~/.snippyt/sample
    snip sample -c "firstname=John;lastname=Tenniel"
    # John Tenniel's own snippet  
    
    

    安裝

    pip3 install snippyt
    

    实现原理很简单,就是只想方便下大家的在命令行中 snippet 管理流程。

    欢迎 PR.

    2 replies    2017-04-06 08:24:49 +08:00
    prasanta
        1
    prasanta  
       Apr 5, 2017
    这个用于什么时候呢
    deepreader
        2
    deepreader  
    OP
       Apr 6, 2017
    @prasanta 比如一条 command 很长,但不是很经常用以至于不会做成 alias 。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5280 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 09:38 · PVG 17:38 · LAX 02:38 · JFK 05:38
    ♥ Do have faith in what you're doing.