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

Terminal app feature idea: a hotkey that puts the last command run in the copy buffer


    function copy_last_command {
        history 1 | sed 's/ [0-9]*  //' | xclip -i
    }
    bind -x '"\C-h":copy_last_command'


The Mac equivalent of xclip -i is pbcopy




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

Search: