Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
zshと仮想端末マネージャで快適ターミナル生活
Search
Nobutoshi Ogata
September 12, 2011
Technology
0
96
zshと仮想端末マネージャで快適ターミナル生活
Nobutoshi Ogata
September 12, 2011
Tweet
Share
More Decks by Nobutoshi Ogata
See All by Nobutoshi Ogata
サーバサイドの技術スタック・アーキテクチャ総ざらい - SmartNews Tech Night in Fukuoka Vol.1
nobu666
1
17k
SmartNews x PLAID - Cost cut and AWS Enterprise Support
nobu666
0
230
Why Slack?
nobu666
0
270
A Complete Work of SmartNews's SRE
nobu666
2
2.8k
SRE at SmartNews
nobu666
0
7.6k
SmartNews の最近の取り組みについて
nobu666
4
3.4k
Introducing in-hourse PaaS
nobu666
1
250
Monitoring of SmartNews
nobu666
0
130
The story becase happy with itamae
nobu666
0
100
Other Decks in Technology
See All in Technology
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
複雑なState管理からの脱却
sansantech
PRO
1
140
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
270
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
強いチームと開発生産性
onk
PRO
34
11k
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
Can We Measure Developer Productivity?
ewolff
1
150
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
470
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
580
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
160
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
380
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Ruby is Unlike a Banana
tanoku
97
11k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
89
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
A Modern Web Designer's Workflow
chriscoyier
693
190k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Transcript
zshͱԾ ϚωʔδϟͰ շదλʔϛφϧੜ׆ άϦʔגࣜձࣾ ։ൃຊ෦Πϯϑϥ౷ׅ෦ ඌܗ ெढ़ 119݄12݄༵
ΦϥΫϧͳ͏ 119݄12݄༵
About me ඌܗ ெढ़(͓͕ͨ ͷͿͱ͠) @nobu666 http://www.facebook.com/nobutoshi.ogata άϦʔגࣜձࣾ ։ൃຊ෦Πϯϑϥ౷ׅ෦ 2011/8/1ʙ
[email protected]
119݄12݄༵
͍··Ͱͬͯͨ͜ͱ ຊΞϧΰϦζϜגࣜձࣾ डୗ։ൃ ҩྍܥ/ༀܥͷγεςϜ χϑςΟגࣜձࣾʹɺNECϏοά ϩʔϒגࣜձࣾʹ2΄Ͳৗறͯ͠ɺ WebΞϓϦͷઃܭʙ։ൃʙӡ༻·Ͱ 119݄12݄༵
͍·ͬͯΔ͜ͱ ήʔϜ࡞ͬͯ·ͤΜ ϝʔϧͱ͔ɺͷMySQL Proxyͱ ͔ɺͦͷลͷαʔϏεج൫Λ୲͢Δ νʔϜ શจݕࡧͷϦϓϨʔε͡Ί·ͨ͠ 119݄12݄༵
ͦΜͳΘ͚Ͱ λʔϛφϧͱ ྑ͠Ͱ͢ 119݄12݄༵
͜ͷεϥΠυͷओࢫ zsh͜Θ͘ͳ͍Α!! ԾϚωʔδϟ͜Θ͘ͳ͍Α!! ͜ͷ2͕ͯ͢ͳͷͰɺ͢Ͱʹ͍ࠐ ΜͰ͍ΔਓʹΓͳ͍༰Ͱ͢ɻ ྃ͝ঝ͍ͩ͘͞ɻ 119݄12݄༵
ΞδΣϯμ zshɺscreenΛ͍࢝Ί͖͔͚ͨͬ ศར͞ͷҰΛ͝հ Ͱઃఆ͕໘ͳΜͰ͠ΐʁͳํ ·ͱΊ 119݄12݄༵
zshͱscreenΛ ͍࢝Ί͖͔͚ͨͬ 119݄12݄༵
Development Environment Conference 2006/9/9 5લ……ͩͱ…ʁ ड։͔࢝Β3Ͱຬһʹ http://b.hatena.ne.jp/t/decon zshίϐϖͰ͍ͬͯͨͷͷɺ screenͬͯͳ͔ͬͨ 119݄12݄༵
DEConҎલ ɹ_______________________ ɹɹɹɹɹʻ◦√ɹɹͦͬ͘͏ͩΊ͔ɾɾ!! ɹɹɹɹɹ ͘͘ɹɹɹ࡞ۀ͢Δαʔόʔ͕ଟ͗͢Δ ɹɹɹɹɹ ը໘͕PuTTYͩΒ͚ʹ ͳͬͯ͠·͏ɾɾ!! 119݄12݄༵
DEConҎޙ ________________________________ ~| \◦ େৎ͔ʁBOY ∥\ <◦> ∥/ ∥ /│ >> \│ ɹ screen͞Μʂʂ
119݄12݄༵
screen ԾϚωʔδϟͷҰछ screen tscreen tmux byobu 119݄12݄༵
119݄12݄༵
tmux!! ͣͬͱscreenͰ͕ͨ͠ɺࠓճͷεϥΠ υͷͨΊʹͪΐͬͱ͍࢝ΊͨΒΑ ͔ͬͨ!! ͱ͍͏Θ͚Ͱվफ͠·͢ ʼʻ جຊతʹҰॹͰ͕͢ɺσϑΥϧτͰ ͦΕͬΆ͍ઃఆʹͳ͍ͬͯ·͢ 119݄12݄༵
screen/tmuxͷ ͏Ε͍͠ͱ͜Ζ 119݄12݄༵
Α͏ͧ͏͞Μͱ͔ͿΒͳ͍ൣғͰ ͳ͕Β࡞ۀ ׂͯ͠ϩάΛݟͳ͕Β ͍ͭऴΘΔͷ͔Α͘Θ͔Βͳ͍όονͷىಈ σλονͯ͠ؼΔ ϩάΛͤΔ ڭҭͷҰͱͯ͑͠Δ ϚϧνΞλονϞʔυ 119݄12݄༵
zshͷ ͏Ε͍͠ͱ͜Ζ 119݄12݄༵
119݄12݄༵
ཤྺͷΓํ͕͏Ε͍͠ ෳߦʹΔίϚϯυཤྺͷΓํ ͔͠ΤσΟλͷΑ͏ʹ్தΛॻ͖ ͑ͨΓͰ͖·͢ nobu666@cherub $ for n in 1
2 3 for# do for# echo test; for# done test test test nobu666@cherub $(͜͜ͰC-p) nobu666@cherub $for n in 1 2 3 do echo test; done 119݄12݄༵
ࢉज़ԋࢉ͕͏Ε͍͠ nobu666@cherub $ zmodload -i zsh/mathfunc nobu666@cherub $ echo $((
sin(1) )) 0.8414709848078965 nobu666@cherub $ echo $(( log10(2) )) 0.3010299956639812 nobu666@cherub $ echo $(( sqrt(2) )) 1.4142135623730951 nobu666@cherub $ repeat 3 echo $(( rand48() )) 0.9822596229634506 0.37442021252918423 0.13525322333015666 119݄12݄༵
ελοΫ͕͏Ε͍͠ ͬͨΒ͍͠configureΦϓγϣϯॻ͍ ͯΔ్தʹɺ;͍ʹ --help ͕Έͨ͘ͳ Δ C-a C-kͯ͠configure --helpͯ͠C-y……? ESC-q
Ͱ͓̺!! 119݄12݄༵
glob͕͏Ε͍͠ important.cҎ֎ͷ*.cΛফ͍ͨ͠ rm *.c~important.c *.txtҎ֎Λফ͍ͨ͠ rm *~*.txt find . -name
‘*.c’|xargs grep hoge grep hoge **/*.c 119݄12݄༵
άϩʔόϧΤΠϦΞε͕͏Ε͍͠ hogehoge | piyopiyo tail -f /var/log/php.log G Fatal ls
-la L ޙΖʹύΠϓͰͭͳ͛ͯɺׂͱΑ͘͏ͷ શ෦ొ head,tail,grep,sort,uniq,lv,wc,sed,awk... 119݄12݄༵
ϚϧνϦμΠϨΫτ͕͏Ε͍͠ echo “test” > f1 >f2 echo “TEST” >file? <
f1 <f2 < f1 > f3 119݄12݄༵
ϓϩηεஔ͕͏Ε͍͠ ͱࢥͬͨΒbashͰͰ͖ΔΒ͘͠… (´ɾωɾʆ) paste <(hoge) <(moge) diff -u <(hoge|piyo) <(hoge|moge)
αʔόʹtmpϑΝΠϧ࡞Γͨ͘ͳ͍ͱ͖ ͱ͔ʹͲ͏ͧ 119݄12݄༵
Ͱઃఆ͕ ΊΜͲͦ͘͞͏ 119݄12݄༵
ͦΜͳ͋ͳͨͷͨΊʹ zshͷ߹ oh-my-zsh https://github.com/robbyrussell/oh-my-zsh gitͰ͖࣋ͬͯͯthemeΛબΜͩΒɺͦΕͬΆ͍ ઃఆ͕͞Εͯ·͢ https://github.com/robbyrussell/oh-my-zsh/wiki/ themes 119݄12݄༵
ͦΜͳ͋ͳͨͷͨΊʹ(2) screenͷ߹ screen wrapper byobu tmux ͲͬͪσϑΥϧτͰɺͳΜ͔ͦΕͬ Ά͍ઃఆ͕ೖͬͯ·͢ 119݄12݄༵
DEMO 119݄12݄༵
·ͱΊ ݹͷಓ۩ͱ͖ͬͭʹ͍͘ ͕ɺ֮͑Δͱڧྗ zshͦͦ͜͜ރΕ͖ͯͨ Έ߹Θͤ ΦϨΦϨڥ 119݄12݄༵
άϦʔͰ ٕज़ऀΛେืू ͍ͯ͠·͢ʼʻ 119݄12݄༵
͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ 119݄12݄༵