15
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

chrome.zshというiTerm2からブラウザを操作し、URLコピーや掲載されているコードを実行できるツールを作った

Last updated at Posted at 2014-04-12

##はじめに

私は、調べ物をしているとき、Webサイトに掲載されているコマンドをコピーし、端末に移動し、貼り付け、実行という手順を踏むことがよくありました。

しかし、この手順は、非常に面倒なのです。できれば端末だけで完結させたいものだと思っていました。

ということで、端末からWebに掲載されているコマンドを実行するairchrome.zshというものを作りました。

正直、自分が使えればいいという感じでスクリプトを整理するついでに作ったものなので、他の人が使えるかどうなのか分かりませんが、もしよろしければ試してみてください。

もし動作した場合、報告してくれるとうれしいです。

chrome.zsh

##動作環境

OS : Mavericks 10.9.2

Terminal : iTerm2

Shell : zsh

Browser : Google Chrome

##インストール

追記:

http://syui.co/blog/2014/06/12/airchrome/

$ git clone https://github.com/syui/airchrome.zsh

$ cd !$:t

$ ./airchrome.setup

$ zsh

##使い方

キー 効果
? ヘルプ
jj 有効
i 無効
1 ウィンドウの透過
j スクロール(下)
k スクロール(上)
c コマンドをコピー
cc コマンドを範囲コピー
yy URLとタイトルをコピー

ちなみに、範囲コピーcc,cjなどは、視点、終点を選択します。

##確認

一応、QiitaOctopressGithubでコマンドをコピーできることを確認しました。

ただし、他のサイトのコードの表示形式によっては、上手くいかない場合もあります。

15
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?