alias prevcopy='history | tail -n 2 | head -n 1 | perl -pe "s/^ *\d+ *//g" | xclip -selection clipboard'
Ubuntu 12.0 で動作確認。.bash_aliases とかに書いておくと、あ、このコマンド VM 上でもまた叩きたい、てな時に便利。
More than 5 years have passed since last update.
alias prevcopy='history | tail -n 2 | head -n 1 | perl -pe "s/^ *\d+ *//g" | xclip -selection clipboard'
Ubuntu 12.0 で動作確認。.bash_aliases とかに書いておくと、あ、このコマンド VM 上でもまた叩きたい、てな時に便利。
Register as a new user and use Qiita more conveniently