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
Into the Great Unknown - MozCon
thekraken
32
1.5k
Visualization
eitanlees
145
15k
Being A Developer After 40
akosma
86
590k
Embracing the Ebb and Flow
colly
84
4.5k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
GitHub's CSS Performance
jonrohan
1030
460k
Navigating Team Friction
lara
183
14k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Designing for humans not robots
tammielis
250
25k
Done Done
chrislema
181
16k
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.