Change checkmail script: instead of "all" accept "-a"

This commit is contained in:
Thomas Dehaeze 2019-08-23 10:00:47 +02:00
parent 85c70b41cb
commit 3f1d182535
2 changed files with 4 additions and 10 deletions

View File

@ -632,7 +632,7 @@ Sync Mailbox
Sync email Sync email
#+BEGIN_SRC conf #+BEGIN_SRC conf
macro index,pager o "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail.sh<enter>" macro index,pager o "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail.sh<enter>"
macro index,pager O "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail.sh all<enter>" macro index,pager O "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail.sh -a<enter>"
#+END_SRC #+END_SRC
Make quick html view macro Make quick html view macro
@ -1226,16 +1226,10 @@ First, tag the files you want to send using =t=, then =;= to apply the action on
:header-args+: :shebang "#!/usr/bin/env bash" :header-args+: :shebang "#!/usr/bin/env bash"
:END: :END:
#+begin_src bash #+begin_src bash
if [ "$1" = "all" ]; then
arg='-a'
else
arg=''
fi
if [ $TMUX ]; then if [ $TMUX ]; then
tmux split -v -l 1 ~/scripts/checkmail.sh $arg && tmux select-pane -U tmux split -v -l 1 ~/scripts/checkmail.sh $1 && tmux select-pane -U
else else
$command ~/scripts/checkmail.sh $1
fi fi
#+end_src #+end_src

View File

@ -166,7 +166,7 @@
#+begin_src bash #+begin_src bash
while [ -n "$1" ]; do # while loop starts while [ -n "$1" ]; do # while loop starts
case "$1" in case "$1" in
-a) opt_mbsync_all='--all' ;; # Check All inboxes -a) opt_all='--all' ;; # Check All inboxes
-v) opt_verbose='--verbose' ;; # Verbose -v) opt_verbose='--verbose' ;; # Verbose
-q) opt_quiet='--quiet' ;; # Quiet -q) opt_quiet='--quiet' ;; # Quiet
*) echo "Option $1 not recognized" ;; # In case you typed a different option *) echo "Option $1 not recognized" ;; # In case you typed a different option