#!/bin/bash

# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

sledge=$PWD/cli/sledge_cli.exe

line=$(\
  $sledge help -recursive -expand \
    | grep -n "== subcommands ===" \
    | cut -d : -f1,1)

line=$(($line+1))

$sledge help -recursive | sed -e "s/sledge_cli.exe/sledge/g"

$sledge h -r -e \
  | tail -n +$line \
  | sed -e "/^$/d;s/  \(.*\)  .*/\1/g" \
  | while read cmd; do \
      printf "\n====== sledge $cmd ======\n\n"; \
      $sledge $cmd -help | sed -e "s/sledge_cli.exe/sledge/g"; \
    done

#!/bin/bash

# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

sledge=$PWD/cli/sledge_cli.exe

export SLEDGE_CONFIG=$PWD/../../test/config

line=$(\
  $sledge help -recursive -expand \
    | grep -n "== subcommands ===" \
    | cut -d : -f1,1)

line=$(($line+1))

$sledge help -recursive | sed -e "s/sledge_cli.exe/sledge/g"

$sledge h -r -e \
  | tail -n +$line \
  | sed -e "/^$/d;s/  \(.*\)  .*/\1/g" \
  | while read cmd; do \
      printf "\n====== sledge $cmd ======\n\n"; \
      $sledge $cmd -help | sed -e "s/sledge_cli.exe/sledge/g"; \
    done

Use minimal config for generating the help file
[sledge] Use minimal config for generating the help file

Summary:
Protect against including warning messages about not finding the
config file in the help file.

Reviewed By: ngorogiannis

Differential Revision: D35397648

fbshipit-source-id: 3e5051726c0a91507027edd8bc21e5a9f39ab3ff
