diff --git a/README.md b/README.md index af86279..229391b 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ ff is a bash script which is a combination of 'mkdir' and 'touch'. It can create ```bash ff [path file or folder] + --help : prints usage info + -v : prints created files ``` ## Examples diff --git a/ff b/ff index cd7b186..35585c3 100755 --- a/ff +++ b/ff @@ -4,7 +4,10 @@ # █▀▀ ▄▀█ █▀ ▀█▀ █▀▀ █ █ █▀▀ █▀ # █▀ █▀█ ▄█ █ █▀ █ █▄▄ ██▄ ▄█ # -# Usage: ff [path file or folder] +# Usage: ff [option] [path file or folder] +# +# --help : prints usage info +# -v : prints created files # # Description: Bash script which is a combination of 'mkdir' and 'touch'. # It can create directory structures and files simultaneously @@ -98,7 +101,7 @@ fi createObjects "$@" -# Only print created files if executing directly from the command line. -if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then +# Only print created files if "-v" (verbose) is the first argument +if [[ "$1" == "-v" ]]; then listObjects "$@" fi