bash completion

This commit is contained in:
ZDV
2024-02-17 22:58:30 +07:00
parent 89d372866a
commit 097aafc660
2 changed files with 113 additions and 7 deletions
+7 -7
View File
@@ -13,7 +13,7 @@ CMD_HELP(){
if [ ! -z $1 ]; then
CMD_INSERT "$@"
else
echo
echo
cat <<-_EOF
Usage:
$PROGRAM init
@@ -27,14 +27,14 @@ Usage:
$PROGRAM version
Show version information.
_EOF
fi
exit 0
fi
exit 0
}
CMD_INIT(){
test -d $NOTESPATH && echo "Note Store already exist" && exit 0 ||
mkdir $NOTESPATH &> /dev/null
echo "New note storage creted to: $NOTESPATH"
echo "New note storage creted to: $NOTESPATH"
exit 0
}
@@ -44,9 +44,9 @@ CMD_SHOWTREE(){
else
echo "Note Store"
tree -N -C -l --noreport $NOTESPATH | tail -n +2 |\
sed -E 's/\.md(\x1B\[[0-9]+m)?( ->|$)/\1\2/g'
sed -E 's/\.md(\x1B\[[0-9]+m)?( ->|$)/\1\2/g'
fi
exit 0
exit 0
}
CMD_FIND(){
@@ -58,7 +58,7 @@ CMD_FIND(){
}
CMD_GREP(){
echo "add to-do grep"
echo "add to-do grep"
}
CMD_COPY_MOVE() {