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

知ってるとお得な iTerm2 と zsh/bash の小技

知ってるとお得な iTerm2 と zsh/bash の小技

LT for M3 Tech Talk #118

Taiju Aoki

June 14, 2019
Tweet

More Decks by Taiju Aoki

Other Decks in Programming

Transcript

  1. ࢲ͸୭ʁ blue (@blue_1617) 2 ࠷ۙͷͰ͖͝ͱ ‣ Nintendo Switch ങ͍·ͨ͠ ‣

    Chromecastɺ40 inch ϞχλΛߪೖݕ౼த ‣ ϓϩόΠμΛ so-net ʹมߋ ‣ νʔϜτοϓ3ͷ࣮ྗऀʢϝϯό਺: 3ʣ ‣ ਺গͳ͍ Emacs Ϣʔβ ‣ θϧμɺΉ͔ͣ͘͠ͳ͍͔ʁ
  2. 4-1. ઃఆͱࢫຯ 16 ‣ ssh ͨ͠/͍ͯ͠Δઌ͕ҰൃͰΘ͔Δ ‣ ຊ൪؀ڥʹ ssh ͨ͠ͱ͖ʹࣄނΒͳ͍

    ઃఆʢͲͪΒ͔ʣ ࢫຯ ‣ iTerm2 ͷ "Automatic Profile Switching" Λ࢖͏ ‣ ssh ίϚϯυΛϑοΫͯ͠ iTerm2 ͷ Profile Λ੾Γସ͑Δ https://www.iterm2.com/documentation-escape-codes.html https://www.iterm2.com/documentation-automatic-profile-switching.html
  3. 5-1. ઃఆͱࢫຯ 19 ‣ ΠϯΫϦϝϯλϧαʔν͕࢖͑ΔΑ͏ʹͳΔ ‣ ༷ʑͳίϚϯυͱ૊Έ߹ΘͤΒΕΔʢޙड़ʣ ઃఆ ࢫຯ ‣

    ެࣜREADMEΛಡΉ ‣ " peco Πϯετʔϧ ํ๏" ͱ͔ͰάάΔ https://github.com/peco/peco
  4. 6-1. ઃఆͱࢫຯ 23 ‣ ΠϯΫϦϝϯλϧαʔν͕ cd Ͱ΋࢖͑ΔΑ͏ʹͳΔ ‣ ҰॠͰผσΟϨΫτϦʹඈ΂Δ ઃఆ

    ࢫຯ ‣ ެࣜREADMEΛಡΉ ‣ " enhancd Πϯετʔϧ ํ๏" ͱ͔ͰάάΔ https://github.com/peco/peco
  5. 7-1. ઃఆͱࢫຯ 25 ‣ աڈͷίϚϯυཤྺΛݩʹࣗಈิ׬͕ޮ͘Α͏ʹͳΔ ‣ λΠϓྔ͕͔ͳΓݮΔ ઃఆ ࢫຯ ‣

    ެࣜREADMEΛಡΉ ‣ " zsh-auto-suggestions Πϯετʔϧ " ͱ͔ͰάάΔ https://github.com/zsh-users/zsh-autosuggestions
  6. 8-1. ઃఆͱࢫຯ 27 ‣ աڈͷίϚϯυཤྺ͔Βಉ͡Α͏ͳίϚϯυΛ୳ͤΔ ‣ peco ʹΑΔݕࡧΑΓ΋ϫϯΞΫγϣϯগͳ͘ಈ࡞͢Δ ઃఆ ࢫຯ

    ‣ ެࣜREADMEΛಡΉ ‣ "zsh-history-substring-search Πϯετʔϧ" ͰάάΔ https://github.com/zsh-users/zsh-history-substring-search
  7. 9-1. ઃఆͱࢫຯ 29 ‣ ॠ࣌ʹ branch ໊ͱ git status ͕Θ͔Δ

    ઃఆ ࢫຯ ‣ ެࣜREADMEΛಡΉ ‣ "zsh git status prompt" ͱ͔ͰάάΔ https://github.com/olivierverdier/zsh-git-prompt
  8. ࠷ޙʹ ‣ ΤσΟλ΍λʔϛφϧ͸ڧ͘Ͱ͖Δ ‣ ΤσΟλ΍λʔϛφϧ͸ϓϩάϥϚͷ෢ث ‣ ෢ثΛຏ͘ͷ͸౰વͱͯ͠ɺ࢖͍͜ͳ͢খٕ΋େࣄ 33 ‣ ΋ͬͱศརʹʂ΋ͬͱڧ͘ʂ

    ‣ ෆศͩͳͱࢥͬͨ఺͸୭͔͕ղফ͍ͯ͠Δέʔε͕ଟ͍ ‣ ͦΕͰ΋ͳ͚Ε͹ࣗ࡞͢Ε͹OK ‣ ެ։͞Ε͍ͯΔ repository ʹ issue ΛཱͯΔͷ΋OK ‣ ͓͢͢ΊػೳΛͥͻڭ͑ͯ͘Εʂ