Fig Docs
  • 🏠Welcome to Fig
  • 👋Get Started
    • Download and Install
    • `fig home`
      • My Apps
      • The Sidebar
      • Settings
    • The Fig App Store
    • Hotkeys
  • 💪Autocomplete
  • 😀The Fig CLI
    • 1. Fig Overrides
    • 2. Fig Aliases
    • 3. $FIGPATH
    • 4. Fig Apps
  • 📖Interactive Runbooks
    • Form Elements
      • Input
      • Textarea
      • Dropdown
      • Checkboxes
      • Buttons
    • Templating & Interpolation
    • Scripting Language (Psilo)
      • Full List of Functions
    • Running Runbooks
    • Full Examples
  • ⚒️ Build your own CLI
    • `fig build`
    • .fig Files
  • 🧰Build your own App
    • Get Started
    • App Lifecycle
    • Key Concepts
      • Running Shell Commands
      • Reading Environment Variables
      • Accessing Files & Saving Data
      • Loading Local Resources
    • Window Managment
      • Setting Window Properties
      • Repositioning the Window
      • Focusing & Blurring the Window
    • Advanced
      • Creating a Pseudo-Terminal Session
  • Other
    • Fig for Teams
    • Security & Privacy
    • FAQ
    • Contact Us
  • Interactive Runbooks
Powered by GitBook
On this page
  1. Interactive Runbooks
  2. Form Elements

Buttons

+[identifier: "Button Label"]{ script that is run when button is clicked }

Examples


<!-- Run Something in the shell -->
+[echo_something: Run Something!]{ [ echo "I ran this from a rundown button" ] run }  


<!-- Insert something into the Terminal, but don't run it -->
+[insert_something: Insert Something!]{ [ cd ~ ] insert }  


<!-- Run a background process -->
+[run_in_background_1: Run in Background 1!]{ [ open -a "Google Chrome" http://google.com ] sh }

<!-- Run a background process -->
+[run_in_background_2: Git Commit and Push!]{ [ git add .' git commit; git push origin master ] sh }


<!-- Close the Fig window -->
+[close: Close Fig Window!]{ close } 


<!-- Run code blocks in the Terminal -->
```bash
echo "I ran this from a code block"
```
PreviousCheckboxesNextTemplating & Interpolation

Last updated 4 years ago

📖