- ローカルマシン: Mac (iTerm2)
- リモートマシン: Linux (ROOT権限なし)
という状況でtmuxのコピーモードでコピーしてきたものをMacで扱いたい。
C-b z
でズームしてからoptionキー押しながらマウスでコピーでもいいんだけど(iTerm2のみ?、ズームしないと複数行コピーするときに隣のペインも選択してしまう)、キーボードだけでやりたい。そこでxselを使う。
If (!(New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { | |
Write-Host 'Run this as administrator.' | |
$choice = Read-Host 'Do you want to re-run this as administrator? [y/N]' | |
if ($choice -ne 'y') { | |
exit 1 | |
} | |
$actualScriptRoot = $PSScriptRoot | |
if ((Get-Item $PSCommandPath).Target) { | |
$actualScriptRoot = Split-Path -Parent ((Get-Item $PSCommandPath).Target) | |
} |
という状況でtmuxのコピーモードでコピーしてきたものをMacで扱いたい。
C-b z
でズームしてからoptionキー押しながらマウスでコピーでもいいんだけど(iTerm2のみ?、ズームしないと複数行コピーするときに隣のペインも選択してしまう)、キーボードだけでやりたい。そこでxselを使う。