Skip to content

Latest commit

 

History

History

list-examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Bashbot Example - List Example Commands

In this example, all of the yaml filenames are aggregated and sorted as a list.

Bashbot Configuration

This command is triggered by sending !bashbot list-examples in a slack channel where Bashbot is also a member. There is no external script for this command, takes no arugments/parameters, and expects Bashbot's examples directory to exist. This command takes no arguments.

name: List Example Commands
description: List commands from bashbot example commands
envvars: []
dependencies: []
help: "!bashbot list-examples"
trigger: list-examples
location: /bashbot/vendor/bashbot/examples
command:
  - find . -name "*.yaml"
  - "| xargs -I {} bash -c"
  - "'export example=$(basename {} .yaml)"
  - "&& echo \"- <https://github.com/mathew-fleisch/bashbot/tree/main/examples/$example|$example>\""
  - "&& echo'"
  - "| sort -k 2"
parameters: []
log: true
ephemeral: false
response: code
permissions:
  - all