mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
simplified subdir parameter passing
This commit is contained in:
parent
53a85845f8
commit
6f3dce6972
1 changed files with 10 additions and 6 deletions
|
|
@ -61,11 +61,15 @@ or run the install script."
|
||||||
local file=$1
|
local file=$1
|
||||||
local command=$2
|
local command=$2
|
||||||
|
|
||||||
|
# Is file an existing subfolder?
|
||||||
|
local sub_dir=""
|
||||||
|
if [ -d ${org_dir}/$file ]; then
|
||||||
|
sub_dir=$file
|
||||||
|
file=""
|
||||||
|
fi
|
||||||
|
|
||||||
case $file in
|
case $file in
|
||||||
"");&
|
"") # applies to subdirs too
|
||||||
--subdir=*)
|
|
||||||
local sub_dir=`echo $file | sed 's|--subdir=||'`
|
|
||||||
local title="You have the following org-mode notes:"
|
local title="You have the following org-mode notes:"
|
||||||
if [ "$sub_dir" != "" ]; then
|
if [ "$sub_dir" != "" ]; then
|
||||||
title=`echo $title | sed "s|:| [${sub_dir}]:|"`
|
title=`echo $title | sed "s|:| [${sub_dir}]:|"`
|
||||||
|
|
@ -82,9 +86,9 @@ or run the install script."
|
||||||
-h);&
|
-h);&
|
||||||
--help)
|
--help)
|
||||||
echo "
|
echo "
|
||||||
`basename $0` [--help] [--sync] [--subdir=<dest>] <filename [--delete] [--move=<dest>] [--encrypt] [--decrypt]>
|
`basename $0` [--help] [--sync] [sub-folder] <filename [--delete] [--move=<dest>] [--encrypt] [--decrypt]>
|
||||||
|
|
||||||
Generates an org-notes file in a folder location set in the $org_loc file
|
Generates an org-notes file in a folder location set in the $org_loc file, or a given sub-folder
|
||||||
";
|
";
|
||||||
return -1;
|
return -1;
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue