Adds some fabric wrappers
This commit is contained in:
parent
81043e8ba1
commit
8d7f3eee20
3 changed files with 80 additions and 0 deletions
37
bin/.bin/fabric/ai-bash-command
Executable file
37
bin/.bin/fabric/ai-bash-command
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
TOOL=""
|
||||
HELP="--help"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Loop through each argument given to the script
|
||||
while [ "${1:0:1}" = "-" ]; do
|
||||
# Use a case statement to set variables based on the value of $arg
|
||||
case $1 in
|
||||
"--tool"|"-t")
|
||||
TOOL="$2"
|
||||
shift
|
||||
;;
|
||||
"--help")
|
||||
HELP="$2"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown argument: $arg"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
{
|
||||
echo "$@"
|
||||
|
||||
echo -e "\n\nThe following documentation might help:"
|
||||
#man "$TOOL"
|
||||
$TOOL $HELP
|
||||
tldr "$TOOL"
|
||||
} 2>&1 | fabric --stream --pattern create_command
|
||||
Loading…
Add table
Add a link
Reference in a new issue