Fork me on GitHub
#off-topic
<
2018-12-12
>
orestis14:12:54

I have a Havanese and he just sleeps all day. We have to convince him to go for a walk in the morning :)

kulminaator14:12:14

I have cat with striped pattern. He probably plans my murder.

Alex Miller (Clojure team)14:12:32

all cats plan the murder of the humans around them, that’s what cats do

😂 8
😻 4
henrik15:12:04

I feel like cats get a bad rap just because most of them are homicidal. #notallcats

henrik15:12:05

https://www.eneroth.com/images/thor.jpeg This is our Lhasa Apso, Thor. 14 year old puppy.

henrik15:12:17

He works in security. He screens visitors and conveniently acts as a secondary door bell just in case we didn’t hear the primary door bell.

andy.fingerhut15:12:43

I don't know the origin of this quote, but love it: "In Ancient Egypt, cats were worshipped as gods.... Cats have never forgotten this."

mseddon15:12:18

Sounds like Terry Pratchett 🙂

henrik16:12:20

Or Neil Gaiman

henrik16:12:49

There’s a good side story in Sandman about cats.

solf16:12:31

Is there a way in zsh (or bash) to reference variables you just wrote at the beginning of the line? For example: FOO=42 echo 52 - 10 = $FOO (which doesn't work)

solf16:12:15

And without exporting the variable globally like in export FOO=42; echo 52 - 10 = $FOO (which works, but then you have a variable FOO in you renv)

Lennart Buit17:12:20

It works in my shell

Lennart Buit17:12:31

FOO=42; echo 52 - 10 = $FOO

Lennart Buit17:12:56

even without the semi

Lennart Buit17:12:04

(zsh user here)

dpsutton17:12:42

is it possible the ; is meaningful in lennart's example but which is missing from yours david?

solf17:12:07

Yes with the semicolon it works, but then FOO is added to your env

Lennart Buit17:12:57

well, thats not surprising is it?

Lennart Buit17:12:15

bash is stateful :’)

Roger17:12:32

plus echo maybe a built-in with special rules

Lennart Buit17:12:05

nah, echo is in /bin

Lennart Buit17:12:10

echo is both? what

solf17:12:21

When you write FOO=42 some-command, some-command's env receives FOO, but FOO isn't saved in your shell env (the one you get with env)

solf17:12:58

This is helpful, for example you might want to write DEBUG=1 some-command at some point, which works as intended

solf17:12:18

but if you write instead DEBUG=1; some-command, the next time you call some-command DEBUG will still be set to 1

Lennart Buit17:12:34

shell has many mysteries to me right now

solf17:12:05

ahah yeah, at some point I thought about reading the zsh manual but nopped out of it very fast

solf17:12:12

so many features

Roger17:12:43

in bash you can try this: _(){ local FOO=42; echo 52 - 10 = $FOO; };_

👍 4
Lennart Buit17:12:02

I was amazed the first time I found a binary called [ in /bin