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
190
React Native ことはじめ
nitaking
0
200
2021-06-24 最近のビルドツール調べてみた
nitaking
0
100
Blitz.jsの紹介
nitaking
1
950
Expo WEB × Next.js は実用できるのか?
nitaking
3
1k
react-hooks-loggerつくった話
nitaking
0
460
あの震えるインタラクションを実装したい
nitaking
1
1.3k
アプリリリースまでのつらみあれこれ
nitaking
0
550
React非同期ライブラリを知る
nitaking
0
160
Featured
See All Featured
Six Lessons from altMBA
skipperchong
27
3.5k
Thoughts on Productivity
jonyablonski
67
4.4k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Writing Fast Ruby
sferik
628
61k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
4 Signs Your Business is Dying
shpigford
181
21k
We Have a Design System, Now What?
morganepeng
51
7.3k
Practical Orchestrator
shlominoach
186
10k
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.