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
Fishのススメ
Search
nitaking
March 05, 2021
0
53
Fishのススメ
2021-03-05 社内LT
nitaking
March 05, 2021
Tweet
Share
More Decks by nitaking
See All by nitaking
人は30分でLT資料を作って発表できるのか
nitaking
0
170
React Native ことはじめ
nitaking
0
190
2021-06-24 最近のビルドツール調べてみた
nitaking
0
97
Blitz.jsの紹介
nitaking
1
930
Expo WEB × Next.js は実用できるのか?
nitaking
3
990
react-hooks-loggerつくった話
nitaking
0
450
あの震えるインタラクションを実装したい
nitaking
1
1.3k
アプリリリースまでのつらみあれこれ
nitaking
0
530
React非同期ライブラリを知る
nitaking
0
160
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Statistics for Hackers
jakevdp
796
220k
Done Done
chrislema
181
16k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
We Have a Design System, Now What?
morganepeng
50
7.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Git: the NoSQL Database
bkeepers
PRO
425
64k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Cult of Friendly URLs
andyhume
78
6k
GraphQLの誤解/rethinking-graphql
sonatard
66
10k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
Transcript
Fish Shellͷ εεϝ 2021-03-05 ࣾLT @nitaking
͢͜ͱ ɾFish Shellͱ ɾFish ShellͰಘΒΕΔͷ ɾFish ShellͰࣦ͏ͷ
Fish Shellʹ͍͍ͯΔਓ ɾγΣϧͷઃఆͰؤுΓͨ͘ͳ͍ͻͱ ɾઃఆͳ͠ͰΠέͯΔShellʹ͍ͨ͠ͻͱ
Fish Shellʹ͍ͯͳ͍ਓ ɾγΣϧܳਓ ɾShellΛΦϨΦϨΧελϚΠζ͍ͨ͠ ɾzsh / bash৴ऀ
FISHͱ
the friendly interactive shell
ϑϨϯυϦʔ ΠϯλϥΫςΟϒ
fishʹɺ ɹߏจͷڧௐදࣔɺ ɹೖྗʹԠͨࣗ͡ಈఏҊɺ ɹػೳ͢ΔϑΝϯγʔͳλϒิ ͳͲͷػೳؚ͕·Ε͓ͯΓɺߏඞཁ͋Γ·ͤΜɻ
͍͍ͱ͜Ζ
·ͣInstall
ݺͼํ
͔͜͜Β࣮ࡍʹಈ͔͠ͳ͕Β
͍͍ͱ͜Ζɿ͡Ί͔Βࣗಈิʂ ίϚϯυཤྺ͔Βউखʹਪଌʂ ઃఆෆཁʂ
͍͍ͱ͜ΖɿTabิ͍͍͢
͜Ε࣮ࡍʹಈ͔͢ͷΛΈ͍ͯͩ͘͞ʂ ͍͍ͱ͜ΖɿϒϥβͰઃఆྃʂ
fish_configͰͰ͖Δ͜ͱ ɾγΣϧͷΧϥʔઃఆ ɾϓϩϯϓτͷදࣔ༰ ɾfunction ɾม ɾΩʔόΠϯυ ɾͳͲ
fish_configͰͰ͖Δ͜ͱ ɾγΣϧͷΧϥʔઃఆ <— ɾϓϩϯϓτͷදࣔ༰ <— ͜ͷลΓ͕ઃఆͰ͖Εे ɾfunction ɾม ɾΩʔόΠϯυ ɾͳͲ
͍͍ͱ͜Ζ
ࣗಈิ ˍ fish_config => ઃఆෆཁʂ
🎉
Ͱߋʹศརʹ͍ͨ͋͠ͳͨɾɾɾ fishʹplugin͋ΔΑ
Plugin: Fisher ɾදతͳPlugin ɾPluginҰ͚ͭͩ ɹ͍Εͨ
Plugin: Fisher ɾz͍͍ͧ ɹʢzshʹ͋ΔΑʣ
ѱ͍ͱ͜Ζ
Bad 1ɿfishߏจ͕bashͱҧ͏ʂ
export ͰPATH͕௨ͤͳ͍ɾɾɾʁ ʢΒ͍͠ʣ
export ͰPATH͕௨ͤͳ͍ɾɾɾʁ ʢͰ௨ͤΔʣ
🤔ʁ
ެࣜͷPATHͷ௨͠ํ
ͰexportͰಈ͘
functionʹexport͕ఆٛ͞Ε͍ͯΔ 1. ͳ͔ͥ fish Ͱ export ίϚϯυ͕͑Δ 2. ࣮ࡍʹ export
ίϚϯυͰແ͘ function
͜͏͍͏ϛεςϦΞε͞ʢṖ༷ʣ ͕͋Δͷ͕FishͰ͢🐠
Bad 2ɿfishͷ༷ʹΉ
Bad 1ɿfishߏจ͕bashͱҧ͏ʂ
‘&&‘͕͑ͳ͍ cd ios && pod install cd ios; pod install
‘||‘͕͑ͳ͍ cd ios || pod install cd ios or pod
install
‘$()’͕͑ͳ͍ code $(pwd) code (pwd)
ڥม͏ͱ͖ʹ’env’ͬͯ ͚ͭͳ͍ͱ͍͚ͳ͍ NODE_ENV=stg npm start env NODE_ENV=stg npm start
ߏจ͕ҧ͏ͷͰ READMEΛίϐϖͯ͠ ҰൃͰಈ͔ͳ͔ͬͨΓ͢Δ .bashrcͱ͔ॻ͖͠ʁ
ղܾࡦɿfishσϑΥϧτγΣϧʹ͠ͳ͍
.bash_profileͷ࠷ޙʹfishΛ࣮ߦ͢Δ => bashߏจͰઃఆͭͭ͠fishΛ͑Δʂ
None
Tipsɿ.bash_profileͱ.bashrcͷҧ͍ 1ճ͚࣮ͩߦɹɹɹɹɹ ɿ .bash_profile γΣϧىಈͷͨͼʹ࣮ߦɿ.bashrc
͏͔ͬΓ.bashrcͰfishΛ࣮ߦ͢Δͱࠈ
.bashrc / .bash_profile exportͱPATHઃఆͷΈ .config/fish/config.fish aliasͷΈ Tipsɿͷߏ
ѱ͍ͱ͜Ζ͔֬ʹ͋Δ
Ͱগ͚ͩ͠׳ΕͨΒ շదͳੈք͕ͬͯΔ🙄
͕ΜΒͳ͍γΣϧ͕͖ͳΒ Fish͕Φεεϝ🐠
Fin.
͓·͚ɿdotfiles dotbotΛ͏ͱߏཧ͍͢͠
͓·͚ɿdotfiles fishͷconfig֊͕ͳ͔ͥਂ͍ ɹ~/.config/fish/config.fish bashrcͳͲΛฏͨ͘ཧ͍ͨ͠
͓·͚ɿdotfiles
͓·͚ɿdotfiles symlinkʹରͯ͠ `vim ~/.bashrc`ͱ͔Ͱ͖Δɻ ҆৺ɻ
Fin.