UNPKG

nx

Version:

The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.

22 lines (21 loc) 569 B
"use strict"; // Shell detection via NX_COMPLETE env var (set by the wrappers). Object.defineProperty(exports, "__esModule", { value: true }); exports.isCompletionRequest = isCompletionRequest; exports.getCompletionShell = getCompletionShell; const KNOWN_SHELLS = new Set([ 'bash', 'zsh', 'fish', 'powershell', ]); function isCompletionRequest() { return Boolean(process.env.NX_COMPLETE); } function getCompletionShell() { const raw = process.env.NX_COMPLETE; if (raw && KNOWN_SHELLS.has(raw)) { return raw; } return null; }