Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One could comment the "very long command" with # and it would appear in the history... no hacks.


this is hotkeyed to Meta-# by default

(one of the readline features i rediscover every three months or so and promptly forget)


Tested and it works brilliantly... it's definitely faster than C-a # RET... Thanks for the tip.


it's fully customizable too. e.g. if you work in a LISP REPL and use rlwrap to provide readline functionality, you could put this in your ~/.inputrc:

    $if lisp
            set comment-begin ;
            M-;: insert-comment
    $endif




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: