nqminhuit@fediverser.communick.devBtoEmacs@fediverser.communick.dev•Weekly Tips, Tricks, &c. ThreadEnglish
1·
1 year agoI like your version, i didn’t notice the navigation duplication before, and that cl-destructuring-bind
is a life saver.
I like your version, i didn’t notice the navigation duplication before, and that cl-destructuring-bind
is a life saver.
I’m glad it helps someone
I’ll test your solution
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.
I’ll try this out, thank you for bringing it up!
Thank you very much for your effort, but I have found a neat way to achieve this, I updated answer on the post.
I think you misunderstood, I need autofilled with the last run command (which is dynamic) not the the hard-coded one.
I saw your final version on your config, just a small question, what does
'(shell-command-history . 1)
means? If I understand it correctly, it returns a new list without the last 1 item from the original list, however I tried to evaluate it on emacs but it does not return the value.