The Zsh Shell Tricks I Wish I'd Known Earlier: Boost Terminal Productivity

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ส.ค. 2024
  • In this video, I share essential Zsh shell tricks that I've discovered over years of development work. These techniques have significantly boosted my terminal productivity, and I wish I'd known them much earlier.
    Powerful shortcuts for cursor navigation, command history manipulation, and advanced text editing that can streamline your workflow. Whether you're a seasoned developer or just starting with Zsh, these tips will help you work more efficiently in the terminal.
    00:00:20 Overview of Zsh
    00:01:10 Navigating Commands
    00:04:00 Introduction to Globbing
    00:05:20 Command & History and Expansion
    00:11:00 Parameter Expansion and Shell Variables
    00:16:00 Custom Commands and Key Bindings
    00:18:30 Summary
    Slides from the presentation: github.com/Pio...
    Companion blog: / the-zsh-shell-tricks-i...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 26

  • @priceld5
    @priceld5 18 วันที่ผ่านมา

    Great video! I appreciate that your videos go a little bit further and deeper than most "getting started" videos.

    • @cloud-native-corner
      @cloud-native-corner  18 วันที่ผ่านมา

      Thank you! That's my goal, to help people learn something new and get excited about digital technology and capabilities it brings.

  • @ebouchut
    @ebouchut 22 วันที่ผ่านมา +2

    I learned some useful tricks from your video. Thank you.

    • @cloud-native-corner
      @cloud-native-corner  22 วันที่ผ่านมา +1

      Thank you, I'm really glad to hear that! Is there anything else in zsh you would like to learn more about?

    • @ebouchut
      @ebouchut 21 วันที่ผ่านมา

      @@cloud-native-corner The most useful `setopt ` and how to use shell process substitution: `diff -u .zshrc

  • @farzadmf
    @farzadmf หลายเดือนก่อน +2

    Very useful video, thank you!

  • @sachajw
    @sachajw 28 วันที่ผ่านมา +1

    Excellent video! I learn't a lot!

    • @cloud-native-corner
      @cloud-native-corner  27 วันที่ผ่านมา

      Thank you! Is there any specific topic you are interested in learning more about?

  • @cloud-native-corner
    @cloud-native-corner  หลายเดือนก่อน +1

    What are your favorite zsh tricks?

  • @wojciech-kulik
    @wojciech-kulik 22 วันที่ผ่านมา

    Really good tricks!
    Btw. zsh is not a default shell on macOS :D (0:41)

    • @cloud-native-corner
      @cloud-native-corner  21 วันที่ผ่านมา

      I think they made it default since catalina: support.apple.com/en-us/102360

    • @wojciech-kulik
      @wojciech-kulik 21 วันที่ผ่านมา

      @@cloud-native-corner wow! That's suprising. I didn't know about it.

  • @aftamohd
    @aftamohd 26 วันที่ผ่านมา

    Is that nvim? How are you using the slides … I see that it’s tmux but how r u changing the slides and ….

    • @cloud-native-corner
      @cloud-native-corner  26 วันที่ผ่านมา

      Yes, I'm using tmux for pane split and opening various files in nvim. For slides, I'm using github.com/maaslalani/slides. Rest are a few custom scripts, you can check the source code for most of my videos in this repo: github.com/Piotr1215/shorts

  • @tuannguyenvanquoc2670
    @tuannguyenvanquoc2670 หลายเดือนก่อน

    how can we remember all of them, so complicated

    • @cloud-native-corner
      @cloud-native-corner  หลายเดือนก่อน +1

      One easy way I used to do it is to have a simple alias `help` which would cat/bat a markdown file with the shortcuts content. You can also use a something like `cheat` which also enables you to create your own cheatsheets files (github.com/cheat/cheat). If you use tmux you can display the content in a hoover pane and bind to a shortcut.

    • @ChrisCox-wv7oo
      @ChrisCox-wv7oo 24 วันที่ผ่านมา

      Make a short list of what you think is most interesting, refer back to that list throughout the week as you find opportunities to use features. Rinse and repeat.

    • @Pongo8844
      @Pongo8844 24 วันที่ผ่านมา

      Best way is to use it regularly

  • @cprn.
    @cprn. หลายเดือนก่อน

    1st of all... `bindkey -v` 😆

    • @cloud-native-corner
      @cloud-native-corner  หลายเดือนก่อน +1

      I've tried it a few times, but there were some issues with history navigation and Ctrl+n/p remaps. Sometimes I have the urge to try it again :)

    • @cprn.
      @cprn. หลายเดือนก่อน

      @@cloud-native-corner Oh, I actually have these two rebound to incremental search. Will paste it in when I'm at the desk (few hours).

    • @cloud-native-corner
      @cloud-native-corner  หลายเดือนก่อน +1

      @@cprn. Thanks! I went into this rabbit hole again and in my notes found this repo: github.com/softmoth/zsh-vim-mode. It works for me and adds surround bindings and text objects.

    • @cprn.
      @cprn. หลายเดือนก่อน

      @@cloud-native-corner Yeah, I know it, but honestly how often do you need surround when editing a command line... It just doesn't happen for me. I only use these 3 lines to get VIM-like line editing:
      ```
      bindkey -v
      bindkey "^P" history-beginning-search-backward
      bindkey "^N" history-beginning-search-forward
      ```

    • @cloud-native-corner
      @cloud-native-corner  หลายเดือนก่อน +1

      Thank you for sharing. I actually often forget to quote https links, so now viW S' or ysiW' and viola. :)