Splash 2020 conf is happening this week
2020.splashcon.org1 pointsby rgrau0 comments
unhist () {
alias $1=" $1"
}
unhist unhist
unhist fzf
unhist rghist #custom command that greps .zhistory,... foo |
bar |
baz
You don't have to use backquotes, AND, it allows you to comment line by line, because there's no backslash messing with the parser. #!/bin/sh
$*
that's my `~/bin/noglob` file, so when I call a zsh script from bash that uses `noglob`, it doesn't blow up. docker save $image | bzip2 | ssh "$host" 'bunzip2 | docker load' echo "${1:-${env_var:?I need a value for that!}}" &2=+/~x!/:\:x:!100
I wrote a little explanation of it, in case anyone is
curious about how it works: https://github.com/kidd/arraylangs-index/blob/master/noteboo... if (is_foo()) {
return 1;
}
can be cleared with `d%.` from the beginning of the first line. #!/usr/bin/env sh
browse_url() {
firefox http://github.com/$1/issues/$2
}
issue=$(curl https://api.github.com/repos/$1/issues |
jq -r 'map([(.number|tostring), .title] | join(" | ")) | join("\n")' |
dmenu -i -l 10 |
awk "{print \$1}")
browse_url $1 $issue
Although the `| join("\n")` part could be done in a more idomatic way with just `[]`, sometimes the manual way are still clearer to me: map([(.number|tostring), .title] | join(" | "))[] foo="ls -las"
$foo
"$foo"
for zsh to split words, `setopt SH_SPLIT_WORDS`.
Using brackets like this is something I never thought of, and it's probably why it's hard for me to process it, but I can see it provides nice annotation capabilities, and it's a more self-contained style.
Thx for sharing!