SP
Size: a a a
M
source ~/fuchsia/scripts/fx-env.sh
M
fx help
zsh: command not found: fx
M
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
## usage: . scripts/fx-env.sh [--bash-build-completions]
##
## optional arguments:
## --bash-build-completion Enables BASH completion support for the `fx build`
## command. See //scripts/gn_complete/README.md for
## other requirements.
### NOTE!
###
### This is not a normal shell script that executes on its own.
###
### It's evaluated directly in a user's interactive shell using
### the `.` or `source` shell built-in.
###
### Hence, this code must be careful not to pollute the user's shell
### with variable or function symbols that users don't want.
function __fx_env_main() {
local bash_build_completion=false
for arg in "$@"; do
if [[ "${arg}" == "--bash-build-completion" ]]; then
bash_build_completion=true
fi
done
if [[ -n "${ZSH_VERSION}" ]]; then
export FUCHSIA_DIR="$(cd "$(dirname "${(%):-%x}")/.." >/dev/null 2>&1 && pwd)"
else
export FUCHSIA_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null 2>&1 && pwd)"
fi
M
M
M
M