Upgrade to Pro — share decks privately, control downloads, hide ads and more …

より良いターミナルでの生活を求めて

 より良いターミナルでの生活を求めて

社内LT会で話した資料です

Avatar for takashabe

takashabe

August 23, 2024
Tweet

More Decks by takashabe

Other Decks in Technology

Transcript

  1. $ whoami • @takashabe • https://github.com/takashabe • https://bsky.app/pro fi le/takashabe.bsky.social

    • Software Engineer • Keyboard • crkbd v3 + corchim + HMX XINHAI 45g • ଧ伴ײɺଧ伴Իͱ΋ʹ࠷ߴ • HMX੡඼Λࢼ͢ͷָ͕͍͠
  2. ීஈͷੜ׆ελΠϧ • ࢓ࣄ͸macOS • Space 4ຕݻఆ • display 1 •

    space 1: terminal (·Εʹvscode, zed) • space 2: ϒϥ΢β • display 2 • 3: obsidian, pomodoro • 4: slack, gather • ։ൃ͸શ෦terminal • ϖΞϓϩͷͱ͖vscode, neovimյΕͨͱ͖ʹzed
  3. QOL޲্ʹͭͳ͕ͬͨऔΓ૊Έ͋Δ͍͸πʔϧ15બ 1. fuzzy fi nder 2. ghr 3. z 4.

    prompt 5. fi sh-shell 6. terminal multiplexer 7. gcloud con fi g con fi grations 8. history 9. history merge 10.notify long running command 11.Amazon Q (CLI completion) 12.all-in-one 13.yabai 14.skhd 15.(neo)vim
  4. fuzzy fi nder • https://github.com/junegunn/fzf • ԿΒ͔ͷϦετΛιʔεʹͯ͠ɺ͔ͦ͜Βબ୒Ͱ͖ΔUI Λఏڙ͢Δπʔϧ • ਪ͠ϙΠϯτ

    • ແݶͷՄೳੑ͕͋Δɻඇৗʹ൚༻ੑͷߴ͍֓೦ • Φεεϝ౓ 🌟🌟🌟🌟🌟
  5. ghq • https://github.com/x-motemen/ghq • ϦϙδτϦ؅ཧΛҰׅ؅ཧ͢ΔͨΊͷπʔϧ • ਪ͠ϙΠϯτ • Կͱͳ͘࡞ͬͯ؅ཧ͍ͯͨ͠ `~/workspace`

    ͱ͔͕ΑΓ ࢖͍΍͘͢ͳΔ • ghq root഑Լʹશͯू໿͞ΕΔͨΊɺͲ͜Ͱ΋γϡοͱ cloneͰ͖Δ • fuzzy fi nderͱͷ૬ੑൈ܈ • Φεεϝ౓ 🌟🌟🌟🌟🌟
  6. z • https://github.com/rupa/z • ࣮ࡍʹ͸ fi sh-shell൛Λ࢖ͬͯΔ • https://github.com/jethrokuan/z •

    cdͷཤྺΛஷΊͯɺϦετͨ͠Βδϟϯϓͨ͠ΓͰ͖Δ • ਪ͠ϙΠϯτ • σΟϨΫτϦʹඈΜͩճ਺΍ස౓͔Βྑ͍ײ͡ʹείΞ Λ෇͚ͯ؅ཧͯ͘͠ΕΔ • fuzzy fi nderͱͷ૬ੑൈ܈ • Φεεϝ౓ 🌟🌟🌟🌟🌟
  7. prompt • https://github.com/takashabe/ fi sh-pretty-theme • Έͳ͞Μ͝ଘ͡ͷPS1͍͘͡Δ΍ͭ • ੕ͷ਺΄Ͳπʔϧ͕͋Δ͚Ͳɺࣗ෼ͷཉ͍͠΍͕ͭཉ ͔ͬͨ͠ͷͰࠓ͸ࣗ࡞Λ࢖ͬͯΔ

    • ΋͠σϑΥϧτͷ··࢖ͬͯΔਓ͸Կ͔͠ΒͷπʔϧΛ ೖΕͯΈΔ͜ͱΛΦεεϝ͠·͢ • https://github.com/starship/starship • https://github.com/sorin-ionescu/prezto
  8. fi sh-shell • https://github.com/ fi sh-shell/ fi sh-shell • Friendly

    Interactive SHell ͷུ • POSIXޓ׵Λࣺͯڈͬͯɺφ΢͍γϯλοΫεͰεΫϦϓτ ͕ॻ͚ͨΓɺ࠷ॳ͔Βิ׬͕ޮ͍ͨΓͯ͠ศར • man͔Βิ׬Λ࡞ͬͯ͘ΕΔͷͰɺݸผʹϓϥάΠϯΛೖ ΕΔඞཁ͕ͳ͍ • Φεεϝ౓ 🌟🌟🌟 • γΣϧεΫϦϓτॻ͘ͱ͖͸Ͳ͏ͤBash४ڌͳͷͰɺ fi sh ͷจ๏͸͍ͭ·Ͱܦͬͯ΋֮͑ͳ͍
  9. terminal multiplexer • https://github.com/tmux/tmux • λʔϛφϧΛηογϣϯɺ΢Οϯυ΢ɺϖΠϯʹ෼ׂͯ͠؅ཧ͢Δ͜ ͱ͕ग़དྷΔ • λʔϛφϧ ⊃

    ηογϣϯ ⊃ ΢Οϯυ΢ ⊃ ϖΠϯ • ਪ͠ϙΠϯτ • iTerm2ʹ͋Δλϒͱ͔ϖΠϯͱ͔ΛͲͷλʔϛφϧιϑτ΢ΣΞͰ ΋࢖͑Δ • ηογϣϯ͸λʔϛφϧ͕ऴྃͯ͠΋࢒ΔͷͰɺޡͬͯλʔϛφϧ Λམͱͯ͠΋໭ΕΔ • Φεεϝ౓ 🌟🌟🌟🌟 • ߴػೳͳλʔϛφϧιϑτ΢ΣΞΛ࢖͏ͷͰ͋Ε͹خ͠͞൒ݮ
  10. gcloud con fi g con fi grations • https://cloud.google.com/sdk/gcloud/reference/con fi

    g/ con fi gurations • ෳ਺ͷΞΧ΢ϯτɾϓϩδΣΫτΛ؅ཧͰ͖Δ • ਪ͠ϙΠϯτ • ෳ਺ͷGoogle cloudϓϩδΣΫτΛ࢖͏ͱ͖؆୯ʹ੾Γସ͑ Ͱ͖Δ • Φεεϝ౓ 🌟🌟 • χονͳ༻్ͳͷͰ੕2 • ࢓ࣄͰίϚϯυଧͭͱ͖͸ࣄނ๷ࢭͷͨΊ —project ෇͚͕ͪ ͳͷͰɺ࣮͸͋Μ·੾Γସ͑ͳ͍
  11. history merge • https://gist.github.com/calexandre/ 63547c8dd0e08bf693d298c503e20aab • fi sh-shellͩͱ • ਪ͠ϙΠϯτ

    • tmuxͳͲΛ࢖ͬͯෳ਺ͷηογϣϯΛ։͍͍ͯΔͱ͖Ͱ΋ɺཤྺ ͕ಉظͰ͖ͯศར • Φεεϝ౓ 🌟🌟🌟🌟
  12. notify long running command • https://github.com/marzocchi/zsh-notify • NඵҎ্͔͔ͬͨίϚϯυΛ௨஌ηϯλʔʹඈ͹͢ • fi

    sh-shellͩͱ fi sh_preexec, fi sh_postexecͳͲ૊Έ߹ Θͤͯॻ͚Δ • ਪ͠ϙΠϯτ • make test • yarn test • Φεεϝ౓ 🌟🌟🌟🌟🌟
  13. Amazon Q (CLI completion) • https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command- line-autocomplete.html • ੲ fi

    g https:// fi g.io/ ͩͬͨ΋ͷ • ਪ͠ϙΠϯτ • ਺ଟ͘ͷίϚϯυΛαϙʔτ͍ͯ͠ΔͷͰɺେମΧόʔ͞ΕͯΔ • fi sh-shell͸σϑΥϧτͰྑ͍ײ͡ʹิ׬ͯ͘͠ΕΔ͕man͕ͳ͍ͱπϥ͍ • gcloudͳͲ͸ઐ༻ͷcompletionεΫϦϓτΛϩʔυ͠ͳ͚Ε͹ͳΒͳ ͍ • Φεεϝ౓ 🌟🌟 • ิ׬΢Οϯυ΢͕अຐʹͳΔ͜ͱ͕ଟ͍ • fi shͷͦΕΑΓ͸ࢹೝੑ͕ѱ͍
  14. all-in-one • https://starship.rs/ • https://www.warp.dev/ • https://code.visualstudio.com/ • https://www.lazyvim.org/ •

    ͍ΘΏΔશ෦ೖΓͷπʔϧ܈ • શ෦͸͍Βͳ͍ʹͯ͠΋ϙΠϯτͰʮ͜Εศརͦ͏ʂʯΈ͍ͨͳώϯ τ͕ଟ͍ • ͱΓ͋͑ͣ࠷ॳʹ͞ΘΔͱ͖ʹ΋Φεεϝ • ͨͩ͠ϋϚΔͱແݶʹπϥ͍ҹ৅ɻྫ͑͹LazyVimͷ໰୊ͩͱࢥͬ ͍ͯͯ΋࣮͸ૉͷNeovimଆͷઃఆͰͨ͠ɺͱ͔ • Φεεϝ౓ 🌟🌟🌟🌟
  15. yabai • https://github.com/koekeishiya/yabai • macOSͷtiling window manager • ΢Οϯυ΢ΛॏͶͣʹฒ΂ͯදࣔͰ͖ͨΓɺSpaceͷҠಈ͕ γϡοͱग़དྷͨΓ͢Δ

    • ਪ͠ϙΠϯτ • ͍ͭ΋ͷ࡞ۀ؀ڥΛ࠶ݱ͠΍͍͢ • ޙड़ͷskhdΛ࢖͏ͱجຊతʹΩʔϘʔυ͔ΒखΛ཭͞ͳͯ͘ ྑ͍ • Φεεϝ౓ 🌟🌟 • ޷Έ͕෼͔ΕΔ
  16. ·ͱΊ • λʔϛφϧ(Ͱ΋ͳ͍ͷ΋ࠞͬͯ͡·͕ͨ͠)ੜ׆ͷQOL޲ ্ʹ໾ཱͭπʔϧͷ঺հΛ͠·ͨ͠ • ৼΓฦΔͱࣗ෼͕ΩʔϘʔυͰ׬݁Ͱ͖Δ؀ڥʹڵຯ͕͋ Δ͜ͱ͕෼͔Δ • Fuzzy fi

    nder΍completion͸ΊͪΌͪ͘Ό࢖͏ • Կ͔ͩΜͩઃఆ΍ૢ࡞͸͖֮͑Εͳ͍͠ɺcompletion͔ Β৽ͨͳൃݟΛ͢Δ͜ͱ΋͋Δ • ϓϥΠϕʔτͰ͸ArchLinux + i3Λ࢖͍ͬͯΔͷͰͦͷӨ ڹ΋େ͖ͦ͏