feat: support -n to skip openning file
This commit is contained in:
parent
da48c9946e
commit
06713482b7
10
bin/wl
10
bin/wl
|
@ -9,6 +9,12 @@ format_date() {
|
||||||
date -d "$1" +%Y-%m-%d
|
date -d "$1" +%Y-%m-%d
|
||||||
}
|
}
|
||||||
|
|
||||||
|
X_OPEN=yes
|
||||||
|
if [ "$1" = "-n" ]; then
|
||||||
|
shift
|
||||||
|
X_OPEN=no
|
||||||
|
fi
|
||||||
|
|
||||||
THIS_DATE=$1
|
THIS_DATE=$1
|
||||||
if [ "$THIS_DATE" -eq "$THIS_DATE" ] 2>/dev/null; then # pure number, enter workday offsetting mode
|
if [ "$THIS_DATE" -eq "$THIS_DATE" ] 2>/dev/null; then # pure number, enter workday offsetting mode
|
||||||
COUNT=$THIS_DATE
|
COUNT=$THIS_DATE
|
||||||
|
@ -43,5 +49,7 @@ if [ ! -f $LOGPATH ]; then
|
||||||
echo >> $LOGPATH
|
echo >> $LOGPATH
|
||||||
echo $NEXT_DATE >> $LOGPATH
|
echo $NEXT_DATE >> $LOGPATH
|
||||||
fi
|
fi
|
||||||
x-open $LOGPATH
|
if [ "$X_OPEN" = "yes" ]; then
|
||||||
|
x-open $LOGPATH
|
||||||
|
fi
|
||||||
#Typora $LOGPATH
|
#Typora $LOGPATH
|
||||||
|
|
Loading…
Reference in New Issue
Block a user