callumacrae / dotfiles

:information_source: My dotfiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mail.zsh

piotryordanov opened this issue · comments

Opening here to continue the discussion from himalaya thread

First, thx a lot for documenting it!

  • You are assuming in the script that $TMPDIR is actually set to tmp which is not the case for me. I had to add it to the script.
  • So now, I can run it and choose between accounts, however the list of emails is then empty.

Any idea what might be causing it?
image

You are assuming in the script that $TMPDIR is actually set to tmp

Interesting, I didn't know it wasn't defined everywhere! what environment are you running? (i'm on OS X - where it actually equals /var/folders/hj/ms7v8hnj3_g5swlnb081k_jw0000gn/T/, not /tmp)

So now, I can run it and choose between accounts, however the list of emails is then empty.

Sounds like another environmental difference, probably the script call?

What's the output if you run:

script -t 0 -q /dev/null himalaya --account gmail list -s 2

If that fails, does this work?

script -q -f -e --command 'himalaya --account gmail list -s' /dev/null

i'm running arch under wsl. /tmp is the default TMPDIR on arch :)

After trying things around, the command that worked for me was: script -q -f -e --command 'himalaya --account zoho list ' /dev/null
The first failed, and the second required a value for --size

The final version in zsh that works for me is:
script -q -f -e --command "himalaya --account "${current_account}" list -s 100 " /dev/null | tail -n +2

Awesome :)

I've made that change (and a $TMPDIR change) to the script, does it work for you now?

https://github.com/callumacrae/dotfiles/blob/master/zsh/mail.zsh

current fzf does not have --disabled
unknown option: --disabled

what does this option in older versions?

https://github.com/junegunn/fzf/blob/master/man/man1/fzf.1#L74-L77

https://github.com/junegunn/fzf/blob/master/CHANGELOG.md#0250

Was renamed from --phony in january 2021 :)

Any reason you're not updating? There's other stuff in the changelog that will affect your usage of this script

Ubuntu 21.10 is not so old :)