大家平时使用什么工具管理常用命令和正则表达式啊?

我最常用的 brew update&& brew upgrade 经常手敲,常用的正则表达式都放在 RegExLab (macOS/iPadOS/iOS App)里测试。

有没有和 Emacs 结合起来进行管理的方案呢?谢谢大家 :pray:

yasnippet?或者什么 code snippets 软件,甚至 alfred 之类的也行

顺便不知道 chatGPT 能不能写正则🤣

# Larger bash history (default is 500)
export HISTSIZE=32768
export HISTFILESIZE=$HISTSIZE

可以结合fzf或类似命令行工具。这是我bash的设置,

    function search_bash_history() {
        READLINE_LINE=$(history | grep "${READLINE_LINE}" | sed "1!G;h;\$!d" | fzf | sed "s/^ *[0-9]*  *//g") READLINE_POINT=
    }
    # @see https://www.computerhope.com/unix/bash/bind.htm
    # To see how bind encodes default key combinations, you can run 'bind -P'
    bind -x '"\en": search_bash_history' # M-n
    bind -x '"\C-r": search_bash_history' # C-r
1 个赞

感谢感谢,我尝试一下。