added -v option to list created files

This commit is contained in:
mintycube 2023-09-25 17:35:54 +05:00
parent f6561b5721
commit 798ffbd7ac
2 changed files with 8 additions and 3 deletions

View File

@ -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

9
ff
View File

@ -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