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
54
Fishのススメ
2021-03-05 社内LT
nitaking
March 05, 2021
Tweet
Share
More Decks by nitaking
See All by nitaking
人は30分でLT資料を作って発表できるのか
nitaking
0
180
React Native ことはじめ
nitaking
0
200
2021-06-24 最近のビルドツール調べてみた
nitaking
0
99
Blitz.jsの紹介
nitaking
1
940
Expo WEB × Next.js は実用できるのか?
nitaking
3
1k
react-hooks-loggerつくった話
nitaking
0
460
あの震えるインタラクションを実装したい
nitaking
1
1.3k
アプリリリースまでのつらみあれこれ
nitaking
0
540
React非同期ライブラリを知る
nitaking
0
160
Featured
See All Featured
A Philosophy of Restraint
colly
203
16k
Designing for humans not robots
tammielis
250
25k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Bash Introduction
62gerente
608
210k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
420
Statistics for Hackers
jakevdp
796
220k
Done Done
chrislema
181
16k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
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.