projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo in whatnow2.sh
[mmh]
/
uip
/
whatnow2.sh
diff --git
a/uip/whatnow2.sh
b/uip/whatnow2.sh
index
a4be1a9
..
a4a2cc5
100755
(executable)
--- a/
uip/whatnow2.sh
+++ b/
uip/whatnow2.sh
@@
-19,7
+19,7
@@
printhelp()
version()
{
version()
{
- if [ $# -eq 0 ]
+ if [ $1 -eq 0 ]
then
echo "$0 has no own version number, thus this instead:"
folder -Version
then
echo "$0 has no own version number, thus this instead:"
folder -Version
@@
-61,21
+61,6
@@
get_editor()
return
fi
mheditor=`mhparam 'Editor'`
return
fi
mheditor=`mhparam 'Editor'`
- if [ -n "$mheditor" ]
- then
- return
- fi
- if [ -n "$VISUAL" ]
- then
- mheditor=$VISUAL
- return
- fi
- if [ -n "$EDITOR" ]
- then
- mheditor=$EDITOR
- return
- fi
- mheditor=vi
}
get_showproc()
}
get_showproc()
@@
-177,7
+162,9
@@
send()
delete()
{
delete()
{
- rmm +draft c
+ folder -push $draftfolder >/dev/null 2>&1
+ rmm $draftfolder c
+ folder -pop >/dev/null 2>&1
rm $mhmetafile
}
rm $mhmetafile
}
@@
-243,11
+230,8
@@
fi
command=$1
shift
command=$1
shift
-draftfolder=`mhparam Draft-Folder`
-if [ -z "$dratffolder" ]
-then
- draftfolder="+drafts"
-fi
+draftfolder=`mhparam draftfolder`
+
mhdraft=`mhpath $draftfolder c 2>/dev/null`
if [ -z "$mhdraft" ]
then
mhdraft=`mhpath $draftfolder c 2>/dev/null`
if [ -z "$mhdraft" ]
then
@@
-269,44
+253,44
@@
touch $mhmetafile
case $command in
case $command in
-e*)
+e|ed|edi|edit)
edit "$@"
;;
edit "$@"
;;
-l*)
+l|li|lis|list)
[ $# -eq 0 ] || usage 1
list
;;
[ $# -eq 0 ] || usage 1
list
;;
-s*)
+s|se|sen|send)
send "$@"
;;
send "$@"
;;
-del*)
+del|dele|delet)
[ $# -eq 0 ] || usage 1
delete
;;
[ $# -eq 0 ] || usage 1
delete
;;
-di*)
+di|dis|disp|displ|displa|display)
[ $# -eq 0 ] || usage 1
display
;;
[ $# -eq 0 ] || usage 1
display
;;
-at*)
+at|att|atta|attac|attach)
attach "$@"
;;
attach "$@"
;;
-al*)
+al|ali|alis|alist)
[ $# -eq 0 ] || usage 1
alist
;;
[ $# -eq 0 ] || usage 1
alist
;;
-det*)
+det|deta|detac|detach)
detach "$@"
;;
detach "$@"
;;
-r*)
- refile -nolink -file $mhdraft "$@"
+r|re|ref|refi|refil|refile)
+ refile -file $mhdraft "$@"
;;
;;
-w*)
+w|wh|who|whom)
whom "$@" $mhdraft
;;
whom "$@" $mhdraft
;;
--h*)
+-h|-he|-hel|-help)
usage $#
;;
usage $#
;;
--V*)
+-V|-Ve|-Ver|-Vers|-Versi|-Versio|-Version)
version $#
;;
esac
version $#
;;
esac