Slashdot Mirror


Linux Advent Calendar: "24 Outstanding ZSH Gems"

First time submitter Manko10 writes "After the Advent series last year, there is again a Linux Advent calender. The topic of this year's Advent series is '24 Outstanding ZSH Gems'. Every day from December 1st until December 24th an article will be published each covering a special feature of the Z Shell you might not have known yet."

10 of 46 comments (clear)

  1. Only 24 features? by Baloroth · · Score: 3, Interesting

    Well, that'll get you through... what, the first page of the manual?

    The damn thing has a built-in tcp command system (ok, I think it's technically a "module"). The main man page is just a redirect page. Hell, it might even rival emacs for complexity. I know, I didn't think it was possible either...

    --
    "None can love freedom heartily, but good men; the rest love not freedom, but license." --John Milton
    1. Re:Only 24 features? by inglorion_on_the_net · · Score: 2

      Hell, it might even rival emacs for complexity. I know, I didn't think it was possible either...

      It's not so strange if you think about it. Both are operating systems cleverly disguised as applications, complete with their own programming languages.

      The major difference is that zsh is disguised as a shell, and Emacs is disguised as a text editor.

      I, for one, look forward to the arrival of our minor-mode-wielding zsh overlords.

      --
      Please correct me if I got my facts wrong.
    2. Re:Only 24 features? by ArsenneLupin · · Score: 2
      Slashdot eats < signs for breakfast.

      Here is a fixed version:

      exec 5<>/dev/tcp/www.google.com/80
      echo -e "GET / HTTP/1.1\n\n" >&5
      cat <&5

      Preview is your friend!

  2. <3 zsh by mirix · · Score: 3, Informative

    I wasn't familiar with zsh until I used grml (a fairly handy debian-based live distro, I use for fixing things on occasion). It comes with a pretty spiffy zshrc and zsh by default, which opened me to some of the features of it... pretty nifty... Now I use zsh on everything.

    Some info about grml's use of zsh, here.

    --
    Sent from my PDP-11
  3. Not a ZSH gem, but... by serviscope_minor · · Score: 5, Funny

    Not a ZSH gem, but this is probably the last word in BASH prompts.

    PS1='C:$(echo ${PWD//\//\\\} | tr "[:lower:]" "[:upper:]" |
                              sed -e"s/\\([^\\]\\{6\\}\\)[^\\]\\{2,\\}/\\1~1/g" ) >'

    you'd be wise not to trust random code, but if you look carefully it uses only echo, tr and sed, none of which have programmable IO and only piping, so it is safe.

    --
    SJW n. One who posts facts.
    1. Re:Not a ZSH gem, but... by Anonymous Coward · · Score: 5, Funny

      You are evil.

    2. Re:Not a ZSH gem, but... by Kagetsuki · · Score: 2

      I like how you even used sed to switch up the slashes and break down long names. Now to sneak this into someones bashrc and catch their face when they login...

    3. Re:Not a ZSH gem, but... by CronoCloud · · Score: 3, Informative

      You should have got a Windows style C:prompt, including truncated directroy names if they were over 8 characters.

      Try an "export" before the command, and see if that helps

  4. Re:Correction by larry+bagina · · Score: 2

    No, it's a Linux Advent Colander. For straining your linux advents.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  5. Re:I'm being completely serious here... by bLanark · · Score: 4, Informative

    You are looking for something like this?

    --
    Note to ACs: I won't mod you up, even if you are being funny or insightful. So take a chance! It's not real life!