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
A better future with KSS
kneath
238
17k
Producing Creativity
orderedlist
PRO
341
39k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Facilitating Awesome Meetings
lara
50
6.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Into the Great Unknown - MozCon
thekraken
33
1.5k
Building an army of robots
kneath
302
44k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Designing for humans not robots
tammielis
250
25k
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.