• nqminhuit@fediverser.communick.devB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    Not sure if anyone post this, but I just found a way to autofill (async-) shell-command with latest run command from history with 2 simple lines of code:

    (advice-add #'read-shell-command
     :filter-args #'(lambda(args) (list (car args) (car shell-command-history))))
    

    I’m still learning lisp, so any improvement are welcome.