Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
monotips #3 - fzfる
Search
Ryotaro Tamura
April 15, 2018
Programming
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
monotips #3 - fzfる
社内LTの資料 monotips #3
Ryotaro Tamura
April 15, 2018
Transcript
14 slides
G[GΔ NPOPUJQT 3ZPUBSP5BNVSB
ݩωλ IUUQTRJJUBDPNUNTBOSJOTIBJUFNTDFCBCDEF
G[G IUUQTHJUIVCDPNKVOFHVOOG[G
جຊతͳ͍ํ ‣ ඪ४ೖྗΛ͢ͱରܕͷ6*ʹදࣔͯ͘͠ΕΔ ‣ ΫΤϦΛೖྗ͢ΔͱϚον͢ΔߦͰߜΓࠐΈ ‣ VQ EPXOΩʔͰબߦΛҠಈ ‣ FOUFSͰબߦͷจࣈྻΛग़ྗ͢Δ
ඪ४ೖྗ G[G ରܕ6* ඪ४ग़ྗ
࣮ߦྫ MTMͷ݁ՌΛG[Gʹ͢ ͍͋·͍ݕࡧͰߜΓࠐΉ FOUFSͰग़ྗ
͍ํհ ‣ ެࣜͷXJLJʹେྔͷαϯϓϧ͕͋Δɻ ‣ IUUQTHJUIVCDPNKVOFHVOOG[GXJLJ ‣ ͜ΕݟΕେମͳΜͰͰ͖Δͣ ‣ XJLJͷҰ෦ͱɺࣗ࡞ͷؔΛհ ‣
σϞϝΠϯͰ͢ ‣ ͜ͷઌͷεϥΠυओʹޙ͔ΒݟΔਓ༻
લఏ ‣ NBD04ͷ߹ʹඞཁͳͷ ‣ CBTIY ‣ 3&"%-*/&@-*/& 3&"%-*/&@10*/5͕Yͩͱ͑ͳ͍ ‣ CSFXͳͲͰΠϯετʔϧ
‣ [TIͱ͔Ͱ0, ଟ#6''&3 $63403 ‣ G[Gͷجຊઃఆ ‣ IFJHIUG[Gͷը໘αΠζΛมߋ σϑΥϧτશը໘ ‣ SFWFSTFΫΤϦͷೖྗཝΛը໘্෦ʹมߋ ‣ CPSEFSG[Gͷը໘ͱλʔϛφϧͷڥքʹϘʔμʔදࣔ brew install bash echo '/usr/local/bin/bash' | sudo tee -a /etc/shells chsh -s /usr/local/bin/bash export FZF_DEFAULT_OPTS='--height 40% --reverse --border'
G[GͰ֊Λඈͯ͠DE function fd() { local dir=$(find ${1:-.} -maxdepth ${2:-10} -type
d | sed 's/^\.\///' | # 相対パスの "./" を除去 grep -v "\/\." | # 隠しディレクトリ除外 grep -v "^\." | # 隠しディレクトリ除外 fzf —no-multi) cd "$dir" }
HJUͷϒϥϯνΓସ͑ function fbr() { local branches branch branches=$(git branch -vv)
&& branch=$(echo "$branches" | fzf --no-multi) && git checkout $(echo "$branch" | awk '{print $1}' | sed "s/.* //") }
IJTUPSZΛG[GͰݕࡧ function fzf-select-history() { READLINE_LINE=$(HISTTIMEFORMAT= history | tac | gsed
-e 's/^\s*[0-9]\+\s\+//' | # 履歴番号を除去 awk '!a[$0]++' | # 重複を除外 fzf --no-sort) READLINE_POINT=${#READLINE_LINE} } bind -x '"\C-r": fzf-select-history’ # Ctrl+rでfunctionを呼び出し ‣ 3&"%-*/&@-*/& ‣ CBTIͷSFBEMJOFͷόοϑΝʹࢦఆจࣈΛೖྗ͢Δ ‣ ࣍ͷೖྗड͕࢝·ͬͨ࣌ʹطʹೖྗ͞Εͨঢ়ଶʹͳΔ ‣ 3&"%-*/&@10*/5 ‣ ΧʔιϧͷҐஔΛࢦఆ ‣ 3&"%-*/&@-*/&ͷจࣈΛࢦఆͯ͠ɺΧʔιϧΛඌʹҠಈ
BDLͱG[GͰίʔυݕࡧ function fck() { local out query file line while
out=$(ack "$@" . | fzf --no-height -e --no-sort \ --query=“$query” —print-query); do query=$(head -1 <<< "$out") file=$(sed '1d' <<< "$out" | awk -F : '{print $1}') line=$(sed '1d' <<< "$out" | awk -F : '{print $2}') [ -z "$file" ] && continue less -N -R +$line $file done } ‣ Ҿͳ͠ͰΧϨϯτσΟϨΫτϦҎԼͷશιʔείʔυΛදࣔ ‣ FOUFSΛԡ͢ͱߦҐஔΛࢦఆͯ͠MFTTͰ։͘ ‣ MFTTΛൈ͚Δͱ࠶ͼG[Gͷը໘ʹΔ ΫΤϦจࣈҾ͖ܧ͙ ‣ ةݥͳ߳Γ͕͢Δ໊͚ؔͩͲؾʹ͠ͳ͍ͰͶ
GDL࣮ߦྫ FOUFS RVJU
GDLิ ‣ XIJMFPVU DPNNBOE EPdEPOF ‣ DPNNBOEͷFYJUDPEF͕ͳΒɺEPdEPOFͷॲཧΛ࣮ߦ͠ɺ FYJUDPEF͕Ҏ֎ʹͳΔ·Ͱϧʔϓɻ ‣ G[Gͷฦ͢FYJUDPEF
‣ /PSNBMFYJU FOUFSFYQFDUͰࢦఆͨ͠Ωʔ ‣ /PNBUDI ‣ &SSPS ‣ $53-$PS&4$ ‣ G[Gͷग़ྗPVUʹೖ͍ͬͯΔͷͰɺՃͯ͠MFTT͢ ‣ G[GQSJOURVFSZ ‣ ग़ྗ͕ҎԼͷ௨ΓʹͳΔ ‣ ߦG[GͰೖྗ͍ͯͨ͠ΫΤϦ ‣ ߦબͨ͠ߦ σϑΥϧτ͜Ε͚ͩ ‣ MFTTΛൈ͚Δͱɺ࠶XIJMFͷDPNNBOE G[G ͕࣮ߦ͞ΕΔ ‣ RVFSZΦϓγϣϯʹग़ྗͷߦΛͯ͠ΫΤϦҾ͖ܧ͗
͓ΘΓ ΠέͯΔ͍ํݟ͚ͭͨΒڭ͍͑ͯͩ͘͞
More Decks by Ryotaro Tamura
See All by Ryotaro Tamura
BlockNoteとDuckDB-WASMでつくる、ブラウザ内データ分析環境の設計
tokibi
0
170
Prometheus setup with long term storage
tokibi
7
6.1k
nanafshiを使って簡単に作るFUSEの動的ファイル
tokibi
0
630
IAMロールはどこから来て、どこへ行くのか / Where do IAM rolls come from and where to go?
tokibi
2
2.8k
Other Decks in Programming
See All in Programming
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
170
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
260
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.5k
Performance Optimization With LLMs
xleitix
0
250
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.3k
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
320
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
2
120
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
330
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
300
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
110
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.5k
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
370
Featured
See All Featured
Believing is Seeing
oripsolob
1
280
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
620
Making Projects Easy
brettharned
120
6.9k
HDC tutorial
michielstock
2
1k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Amusing Abliteration
ianozsvald
1
390
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Bash Introduction
62gerente
615
220k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
440
A Modern Web Designer's Workflow
chriscoyier
699
190k
The Invisible Side of Design
smashingmag
301
52k