mirror of
https://github.com/RyanGreenup/cadmus.git
synced 2025-08-06 06:07:37 +02:00
Add Global Path Variable
This commit is contained in:
@@ -22,10 +22,10 @@ main() {
|
|||||||
# *** Skim and Grep, the important stuff
|
# *** Skim and Grep, the important stuff
|
||||||
SkimAndGrep () {
|
SkimAndGrep () {
|
||||||
|
|
||||||
## Change directory if One was specified
|
## Change directory if One was specified, exit if no directory exists
|
||||||
|
|
||||||
if [ "${1:-}" != "" ]; then
|
if [ "${1:-}" != "" ]; then
|
||||||
cd "${1}"
|
cd "${1}" || exit 4
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ arguments () {
|
|||||||
while test $# -gt 0
|
while test $# -gt 0
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-d) SkimAndGrep $2 && exit 0
|
-d) SkimAndGrep "${2}" && exit 0
|
||||||
;;
|
;;
|
||||||
--d) SkimAndGrep $2 && exit 0
|
--d) SkimAndGrep $2 && exit 0
|
||||||
;;
|
;;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
#
|
NOTES_DIR="~/Notes/MD" ## TODO Global Variables are bad
|
||||||
# Author: Ryan Greenup <ryan.greenup@protonmail.com>
|
# Author: Ryan Greenup <ryan.greenup@protonmail.com>
|
||||||
# abort on nonzero exitstatus
|
# abort on nonzero exitstatus
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
2
todo.org
2
todo.org
@@ -11,6 +11,8 @@ Basically I would like to be able to change the note directory to manage seperat
|
|||||||
etc.
|
etc.
|
||||||
|
|
||||||
This should be fed in as a ~-c~ option.
|
This should be fed in as a ~-c~ option.
|
||||||
|
|
||||||
|
[[file:bin/cadmus::NOTES_DIR="~/Notes/MD" ## TODO Global Variables are bad][Refer to this line here]]
|
||||||
** Main Help
|
** Main Help
|
||||||
*** TODO [#C] Move Emojis
|
*** TODO [#C] Move Emojis
|
||||||
I should move the emojis to the end so that they don't interfere when using tty
|
I should move the emojis to the end so that they don't interfere when using tty
|
||||||
|
Reference in New Issue
Block a user