@shell-shock/plugin-completions 0.1.14 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/bash-command.cjs +101 -25
- package/dist/components/bash-command.d.cts +2 -2
- package/dist/components/bash-command.d.cts.map +1 -1
- package/dist/components/bash-command.d.mts +2 -2
- package/dist/components/bash-command.d.mts.map +1 -1
- package/dist/components/bash-command.mjs +101 -25
- package/dist/components/bash-command.mjs.map +1 -1
- package/dist/components/fish-command.cjs +402 -0
- package/dist/components/fish-command.d.cts +10 -0
- package/dist/components/fish-command.d.cts.map +1 -0
- package/dist/components/fish-command.d.mts +10 -0
- package/dist/components/fish-command.d.mts.map +1 -0
- package/dist/components/fish-command.mjs +403 -0
- package/dist/components/fish-command.mjs.map +1 -0
- package/dist/components/index.cjs +4 -0
- package/dist/components/index.d.cts +3 -1
- package/dist/components/index.d.mts +3 -1
- package/dist/components/index.mjs +3 -1
- package/dist/components/powershell-command.cjs +418 -0
- package/dist/components/powershell-command.d.cts +10 -0
- package/dist/components/powershell-command.d.cts.map +1 -0
- package/dist/components/powershell-command.d.mts +10 -0
- package/dist/components/powershell-command.d.mts.map +1 -0
- package/dist/components/powershell-command.mjs +419 -0
- package/dist/components/powershell-command.mjs.map +1 -0
- package/dist/components/zsh-command.cjs +213 -26
- package/dist/components/zsh-command.d.cts.map +1 -1
- package/dist/components/zsh-command.d.mts +2 -2
- package/dist/components/zsh-command.d.mts.map +1 -1
- package/dist/components/zsh-command.mjs +213 -26
- package/dist/components/zsh-command.mjs.map +1 -1
- package/dist/helpers/complete-command.cjs +14 -0
- package/dist/helpers/complete-command.d.cts +5 -0
- package/dist/helpers/complete-command.d.cts.map +1 -0
- package/dist/helpers/complete-command.d.mts +5 -0
- package/dist/helpers/complete-command.d.mts.map +1 -0
- package/dist/helpers/complete-command.mjs +14 -0
- package/dist/helpers/complete-command.mjs.map +1 -0
- package/dist/helpers/completion-directive-constants.cjs +15 -0
- package/dist/helpers/completion-directive-constants.d.cts +14 -0
- package/dist/helpers/completion-directive-constants.d.cts.map +1 -0
- package/dist/helpers/completion-directive-constants.d.mts +14 -0
- package/dist/helpers/completion-directive-constants.d.mts.map +1 -0
- package/dist/helpers/completion-directive-constants.mjs +15 -0
- package/dist/helpers/completion-directive-constants.mjs.map +1 -0
- package/dist/helpers/index.cjs +5 -0
- package/dist/helpers/index.d.cts +3 -0
- package/dist/helpers/index.d.mts +3 -0
- package/dist/helpers/index.mjs +4 -0
- package/dist/index.cjs +42 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +42 -5
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/plugin.d.cts +16 -3
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +16 -3
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/shell-type.cjs +6 -1
- package/dist/types/shell-type.d.cts +1 -1
- package/dist/types/shell-type.d.mts +1 -1
- package/dist/types/shell-type.mjs +6 -1
- package/dist/types/shell-type.mjs.map +1 -1
- package/package.json +79 -8
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const require_helpers_complete_command = require('../helpers/complete-command.cjs');
|
|
2
|
+
const require_helpers_completion_directive_constants = require('../helpers/completion-directive-constants.cjs');
|
|
3
|
+
require('../helpers/index.cjs');
|
|
1
4
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
2
5
|
let __shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
|
|
3
6
|
let __stryke_path = require("@stryke/path");
|
|
@@ -8,6 +11,7 @@ let __powerlines_plugin_alloy_core = require("@powerlines/plugin-alloy/core");
|
|
|
8
11
|
let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
9
12
|
let __powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
|
|
10
13
|
let __powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
14
|
+
let __stryke_string_format_snake_case = require("@stryke/string-format/snake-case");
|
|
11
15
|
|
|
12
16
|
//#region src/components/bash-command.tsx
|
|
13
17
|
/**
|
|
@@ -94,35 +98,107 @@ function BashCompletionsCommand() {
|
|
|
94
98
|
name: "completions",
|
|
95
99
|
type: "string",
|
|
96
100
|
get initializer() {
|
|
97
|
-
return __alloy_js_core.code
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
101
|
+
return __alloy_js_core.code`# bash completion for ${(0, __shell_shock_core_plugin_utils.getAppTitle)(context)}
|
|
102
|
+
|
|
103
|
+
# Define shell completion directives
|
|
104
|
+
readonly ShellCompDirectiveError=${require_helpers_completion_directive_constants.CompletionDirective.CompletionDirectiveError}
|
|
105
|
+
readonly ShellCompDirectiveNoSpace=${require_helpers_completion_directive_constants.CompletionDirective.CompletionDirectiveNoSpace}
|
|
106
|
+
readonly ShellCompDirectiveNoFileComp=${require_helpers_completion_directive_constants.CompletionDirective.CompletionDirectiveNoFileComp}
|
|
107
|
+
readonly ShellCompDirectiveFilterFileExt=${require_helpers_completion_directive_constants.CompletionDirective.CompletionDirectiveFilterFileExt}
|
|
108
|
+
readonly ShellCompDirectiveFilterDirs=${require_helpers_completion_directive_constants.CompletionDirective.CompletionDirectiveFilterDirs}
|
|
109
|
+
readonly ShellCompDirectiveKeepOrder=${require_helpers_completion_directive_constants.CompletionDirective.CompletionDirectiveKeepOrder}
|
|
110
|
+
|
|
111
|
+
# Function to debug completion
|
|
112
|
+
__${(0, __stryke_string_format_snake_case.snakeCase)((0, __shell_shock_core_plugin_utils.getAppBin)(context))}_debug() {
|
|
113
|
+
if [[ -n \${BASH_COMP_DEBUG_FILE:-} ]]; then
|
|
114
|
+
echo "$*" >> "\${BASH_COMP_DEBUG_FILE}"
|
|
115
|
+
fi
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
# Function to handle completions
|
|
119
|
+
__${(0, __stryke_string_format_snake_case.snakeCase)((0, __shell_shock_core_plugin_utils.getAppBin)(context))}_complete() {
|
|
120
|
+
local cur prev words cword
|
|
121
|
+
_get_comp_words_by_ref -n "=:" cur prev words cword
|
|
122
|
+
|
|
123
|
+
local requestComp out directive
|
|
124
|
+
|
|
125
|
+
# Build the command to get completions
|
|
126
|
+
requestComp="${require_helpers_complete_command.exec} complete -- \${words[@]:1}"
|
|
127
|
+
|
|
128
|
+
# Add an empty parameter if the last parameter is complete
|
|
129
|
+
if [[ -z "$cur" ]]; then
|
|
130
|
+
requestComp="$requestComp ''"
|
|
131
|
+
fi
|
|
132
|
+
|
|
133
|
+
# Get completions from the program
|
|
134
|
+
out=$(eval "$requestComp" 2>/dev/null)
|
|
135
|
+
|
|
136
|
+
# Extract directive if present
|
|
137
|
+
directive=0
|
|
138
|
+
if [[ "$out" == *:* ]]; then
|
|
139
|
+
directive=\${out##*:}
|
|
140
|
+
out=\${out%:*}
|
|
119
141
|
fi
|
|
120
142
|
|
|
121
|
-
|
|
143
|
+
# Process completions based on directive
|
|
144
|
+
if [[ $((directive & $ShellCompDirectiveError)) -ne 0 ]]; then
|
|
145
|
+
# Error, no completion
|
|
146
|
+
return
|
|
147
|
+
fi
|
|
148
|
+
|
|
149
|
+
# Apply directives
|
|
150
|
+
if [[ $((directive & $ShellCompDirectiveNoSpace)) -ne 0 ]]; then
|
|
151
|
+
compopt -o nospace
|
|
152
|
+
fi
|
|
153
|
+
if [[ $((directive & $ShellCompDirectiveKeepOrder)) -ne 0 ]]; then
|
|
154
|
+
compopt -o nosort
|
|
155
|
+
fi
|
|
156
|
+
if [[ $((directive & $ShellCompDirectiveNoFileComp)) -ne 0 ]]; then
|
|
157
|
+
compopt +o default
|
|
158
|
+
fi
|
|
159
|
+
|
|
160
|
+
# Handle file extension filtering
|
|
161
|
+
if [[ $((directive & $ShellCompDirectiveFilterFileExt)) -ne 0 ]]; then
|
|
162
|
+
local filter=""
|
|
163
|
+
for ext in $out; do
|
|
164
|
+
filter="$filter|$ext"
|
|
165
|
+
done
|
|
166
|
+
filter="\\.($filter)"
|
|
167
|
+
compopt -o filenames
|
|
168
|
+
COMPREPLY=( $(compgen -f -X "!$filter" -- "$cur") )
|
|
169
|
+
return
|
|
170
|
+
fi
|
|
171
|
+
|
|
172
|
+
# Handle directory filtering
|
|
173
|
+
if [[ $((directive & $ShellCompDirectiveFilterDirs)) -ne 0 ]]; then
|
|
174
|
+
compopt -o dirnames
|
|
175
|
+
COMPREPLY=( $(compgen -d -- "$cur") )
|
|
176
|
+
return
|
|
177
|
+
fi
|
|
178
|
+
|
|
179
|
+
# Process completions
|
|
180
|
+
local IFS=$'\\n'
|
|
181
|
+
local tab=$(printf '\\t')
|
|
182
|
+
|
|
183
|
+
# Parse completions with descriptions
|
|
184
|
+
local completions=()
|
|
185
|
+
while read -r comp; do
|
|
186
|
+
if [[ "$comp" == *$tab* ]]; then
|
|
187
|
+
# Split completion and description
|
|
188
|
+
local value=\${comp%%$tab*}
|
|
189
|
+
local desc=\${comp#*$tab}
|
|
190
|
+
completions+=("$value")
|
|
191
|
+
else
|
|
192
|
+
completions+=("$comp")
|
|
193
|
+
fi
|
|
194
|
+
done <<< "$out"
|
|
195
|
+
|
|
196
|
+
# Return completions
|
|
197
|
+
COMPREPLY=( $(compgen -W "\${completions[*]}" -- "$cur") )
|
|
122
198
|
}
|
|
123
|
-
complete -o bashdefault -o default -F _${(0, __shell_shock_core_plugin_utils.getAppBin)(context)}_completions ${(0, __shell_shock_core_plugin_utils.getAppBin)(context)}
|
|
124
199
|
|
|
125
|
-
|
|
200
|
+
# Register completion function
|
|
201
|
+
complete -F __${(0, __stryke_string_format_snake_case.snakeCase)((0, __shell_shock_core_plugin_utils.getAppBin)(context))}_complete ${(0, __shell_shock_core_plugin_utils.getAppBin)(context)}
|
|
126
202
|
\`); `;
|
|
127
203
|
}
|
|
128
204
|
}),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alloy_js_core1 from "@alloy-js/core";
|
|
2
2
|
|
|
3
3
|
//#region src/components/bash-command.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* The Bash Completions commands' handler wrapper for the Shell Shock project.
|
|
6
6
|
*/
|
|
7
|
-
declare function BashCompletionsCommand():
|
|
7
|
+
declare function BashCompletionsCommand(): _alloy_js_core1.Children;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { BashCompletionsCommand };
|
|
10
10
|
//# sourceMappingURL=bash-command.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash-command.d.cts","names":[],"sources":["../../src/components/bash-command.tsx"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"bash-command.d.cts","names":[],"sources":["../../src/components/bash-command.tsx"],"sourcesContent":[],"mappings":";;;;;;AA+CgB,iBAAA,sBAAA,CAAA,CAAsB,EAAA,eAAA,CAAA,QAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alloy_js_core1 from "@alloy-js/core";
|
|
2
2
|
|
|
3
3
|
//#region src/components/bash-command.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* The Bash Completions commands' handler wrapper for the Shell Shock project.
|
|
6
6
|
*/
|
|
7
|
-
declare function BashCompletionsCommand():
|
|
7
|
+
declare function BashCompletionsCommand(): _alloy_js_core1.Children;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { BashCompletionsCommand };
|
|
10
10
|
//# sourceMappingURL=bash-command.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash-command.d.mts","names":[],"sources":["../../src/components/bash-command.tsx"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"bash-command.d.mts","names":[],"sources":["../../src/components/bash-command.tsx"],"sourcesContent":[],"mappings":";;;;;;AA+CgB,iBAAA,sBAAA,CAAA,CAAsB,EAAA,eAAA,CAAA,QAAA"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { exec } from "../helpers/complete-command.mjs";
|
|
2
|
+
import { CompletionDirective } from "../helpers/completion-directive-constants.mjs";
|
|
3
|
+
import "../helpers/index.mjs";
|
|
1
4
|
import { createComponent, memo } from "@alloy-js/core/jsx-runtime";
|
|
2
5
|
import { getAppBin, getAppTitle } from "@shell-shock/core/plugin-utils";
|
|
3
6
|
import { joinPaths } from "@stryke/path";
|
|
@@ -8,6 +11,7 @@ import { Spacing } from "@powerlines/plugin-alloy/core";
|
|
|
8
11
|
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
9
12
|
import { InterfaceMember, TypescriptFile } from "@powerlines/plugin-alloy/typescript";
|
|
10
13
|
import { TSDoc, TSDocDefaultValue, TSDocRemarks } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
14
|
+
import { snakeCase } from "@stryke/string-format/snake-case";
|
|
11
15
|
|
|
12
16
|
//#region src/components/bash-command.tsx
|
|
13
17
|
/**
|
|
@@ -94,35 +98,107 @@ function BashCompletionsCommand() {
|
|
|
94
98
|
name: "completions",
|
|
95
99
|
type: "string",
|
|
96
100
|
get initializer() {
|
|
97
|
-
return code
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
101
|
+
return code`# bash completion for ${getAppTitle(context)}
|
|
102
|
+
|
|
103
|
+
# Define shell completion directives
|
|
104
|
+
readonly ShellCompDirectiveError=${CompletionDirective.CompletionDirectiveError}
|
|
105
|
+
readonly ShellCompDirectiveNoSpace=${CompletionDirective.CompletionDirectiveNoSpace}
|
|
106
|
+
readonly ShellCompDirectiveNoFileComp=${CompletionDirective.CompletionDirectiveNoFileComp}
|
|
107
|
+
readonly ShellCompDirectiveFilterFileExt=${CompletionDirective.CompletionDirectiveFilterFileExt}
|
|
108
|
+
readonly ShellCompDirectiveFilterDirs=${CompletionDirective.CompletionDirectiveFilterDirs}
|
|
109
|
+
readonly ShellCompDirectiveKeepOrder=${CompletionDirective.CompletionDirectiveKeepOrder}
|
|
110
|
+
|
|
111
|
+
# Function to debug completion
|
|
112
|
+
__${snakeCase(getAppBin(context))}_debug() {
|
|
113
|
+
if [[ -n \${BASH_COMP_DEBUG_FILE:-} ]]; then
|
|
114
|
+
echo "$*" >> "\${BASH_COMP_DEBUG_FILE}"
|
|
115
|
+
fi
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
# Function to handle completions
|
|
119
|
+
__${snakeCase(getAppBin(context))}_complete() {
|
|
120
|
+
local cur prev words cword
|
|
121
|
+
_get_comp_words_by_ref -n "=:" cur prev words cword
|
|
122
|
+
|
|
123
|
+
local requestComp out directive
|
|
124
|
+
|
|
125
|
+
# Build the command to get completions
|
|
126
|
+
requestComp="${exec} complete -- \${words[@]:1}"
|
|
127
|
+
|
|
128
|
+
# Add an empty parameter if the last parameter is complete
|
|
129
|
+
if [[ -z "$cur" ]]; then
|
|
130
|
+
requestComp="$requestComp ''"
|
|
131
|
+
fi
|
|
132
|
+
|
|
133
|
+
# Get completions from the program
|
|
134
|
+
out=$(eval "$requestComp" 2>/dev/null)
|
|
135
|
+
|
|
136
|
+
# Extract directive if present
|
|
137
|
+
directive=0
|
|
138
|
+
if [[ "$out" == *:* ]]; then
|
|
139
|
+
directive=\${out##*:}
|
|
140
|
+
out=\${out%:*}
|
|
119
141
|
fi
|
|
120
142
|
|
|
121
|
-
|
|
143
|
+
# Process completions based on directive
|
|
144
|
+
if [[ $((directive & $ShellCompDirectiveError)) -ne 0 ]]; then
|
|
145
|
+
# Error, no completion
|
|
146
|
+
return
|
|
147
|
+
fi
|
|
148
|
+
|
|
149
|
+
# Apply directives
|
|
150
|
+
if [[ $((directive & $ShellCompDirectiveNoSpace)) -ne 0 ]]; then
|
|
151
|
+
compopt -o nospace
|
|
152
|
+
fi
|
|
153
|
+
if [[ $((directive & $ShellCompDirectiveKeepOrder)) -ne 0 ]]; then
|
|
154
|
+
compopt -o nosort
|
|
155
|
+
fi
|
|
156
|
+
if [[ $((directive & $ShellCompDirectiveNoFileComp)) -ne 0 ]]; then
|
|
157
|
+
compopt +o default
|
|
158
|
+
fi
|
|
159
|
+
|
|
160
|
+
# Handle file extension filtering
|
|
161
|
+
if [[ $((directive & $ShellCompDirectiveFilterFileExt)) -ne 0 ]]; then
|
|
162
|
+
local filter=""
|
|
163
|
+
for ext in $out; do
|
|
164
|
+
filter="$filter|$ext"
|
|
165
|
+
done
|
|
166
|
+
filter="\\.($filter)"
|
|
167
|
+
compopt -o filenames
|
|
168
|
+
COMPREPLY=( $(compgen -f -X "!$filter" -- "$cur") )
|
|
169
|
+
return
|
|
170
|
+
fi
|
|
171
|
+
|
|
172
|
+
# Handle directory filtering
|
|
173
|
+
if [[ $((directive & $ShellCompDirectiveFilterDirs)) -ne 0 ]]; then
|
|
174
|
+
compopt -o dirnames
|
|
175
|
+
COMPREPLY=( $(compgen -d -- "$cur") )
|
|
176
|
+
return
|
|
177
|
+
fi
|
|
178
|
+
|
|
179
|
+
# Process completions
|
|
180
|
+
local IFS=$'\\n'
|
|
181
|
+
local tab=$(printf '\\t')
|
|
182
|
+
|
|
183
|
+
# Parse completions with descriptions
|
|
184
|
+
local completions=()
|
|
185
|
+
while read -r comp; do
|
|
186
|
+
if [[ "$comp" == *$tab* ]]; then
|
|
187
|
+
# Split completion and description
|
|
188
|
+
local value=\${comp%%$tab*}
|
|
189
|
+
local desc=\${comp#*$tab}
|
|
190
|
+
completions+=("$value")
|
|
191
|
+
else
|
|
192
|
+
completions+=("$comp")
|
|
193
|
+
fi
|
|
194
|
+
done <<< "$out"
|
|
195
|
+
|
|
196
|
+
# Return completions
|
|
197
|
+
COMPREPLY=( $(compgen -W "\${completions[*]}" -- "$cur") )
|
|
122
198
|
}
|
|
123
|
-
complete -o bashdefault -o default -F _${getAppBin(context)}_completions ${getAppBin(context)}
|
|
124
199
|
|
|
125
|
-
|
|
200
|
+
# Register completion function
|
|
201
|
+
complete -F __${snakeCase(getAppBin(context))}_complete ${getAppBin(context)}
|
|
126
202
|
\`); `;
|
|
127
203
|
}
|
|
128
204
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash-command.mjs","names":["code","FunctionDeclaration","IfStatement","InterfaceDeclaration","VarDeclaration","ReflectionKind","Spacing","usePowerlines","InterfaceMember","TypescriptFile","TSDoc","TSDocDefaultValue","TSDocRemarks","getAppBin","getAppTitle","joinPaths","BashCompletionsCommand","context","_$createComponent","path","entryPath","imports","builtinImports","children","heading","name","type","string","defaultValue","optional","async","parameters","initializer","condition","_$memo"],"sources":["../../src/components/bash-command.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code } from \"@alloy-js/core\";\nimport {\n FunctionDeclaration,\n IfStatement,\n InterfaceDeclaration,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport {\n InterfaceMember,\n TypescriptFile\n} from \"@powerlines/plugin-alloy/typescript\";\nimport {\n TSDoc,\n TSDocDefaultValue,\n TSDocRemarks\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { getAppBin, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path\";\nimport type { CompletionsPluginContext } from \"../types/plugin\";\n\n/**\n * The Bash Completions commands' handler wrapper for the Shell Shock project.\n */\nexport function BashCompletionsCommand() {\n const context = usePowerlines<CompletionsPluginContext>();\n\n return (\n <TypescriptFile\n path={joinPaths(context.entryPath, \"completions\", \"bash\", \"command.ts\")}\n imports={{\n \"node:os\": [\"os\"],\n \"node:fs/promises\": [\"readFile\", \"writeFile\"]\n }}\n builtinImports={{\n \"shell-shock:console\": [\n \"colors\",\n \"writeLine\",\n \"success\",\n \"warn\",\n \"stripAnsi\"\n ]\n }}>\n <TSDoc heading=\"Options for the Bash completions command.\" />\n <InterfaceDeclaration export name=\"BashCompletionsOptions\">\n <TSDoc heading=\"The path to write the completion script to.\">\n <TSDocRemarks>{`If no extension is provided, the \\`.bash\\` extension will be used.`}</TSDocRemarks>\n <TSDocDefaultValue\n type={ReflectionKind.string}\n defaultValue={`${getAppBin(context)}-completions.bash`}\n />\n </TSDoc>\n <InterfaceMember name=\"script\" optional type=\"string | true\" />\n <Spacing />\n <TSDoc heading=\"The Bash configuration file to append the completion script to.\">\n <TSDocRemarks>{`The generated completion script will be appended to the specified configuration file. Possible values for the Bash configuration file include: \\\\n- \\`~/.bashrc\\` \\\\n- \\`~/.bash_profile\\``}</TSDocRemarks>\n <TSDocDefaultValue\n type={ReflectionKind.string}\n defaultValue=\"~/.bashrc\"\n />\n </TSDoc>\n <InterfaceMember name=\"config\" optional type=\"string | true\" />\n </InterfaceDeclaration>\n <Spacing />\n <TSDoc heading=\"Handler logic for the \\`completions bash\\` command.\"></TSDoc>\n <FunctionDeclaration\n export\n default\n async\n name=\"handler\"\n parameters={[{ name: \"options\", type: \"BashCompletionsOptions\" }]}>\n <VarDeclaration\n const\n name=\"completions\"\n type=\"string\"\n initializer={code`colors.white(\\`\\${colors.gray(\"###-begin-${getAppBin(context)}-completions-###\")}\n\n\\${colors.gray(\\`\n# \\${colors.bold(\"${getAppTitle(context)} Bash CLI command completion script\")}\n#\n# \\${colors.bold(\"Installation:\")} ${getAppBin(context)} completions bash --config ~/.bashrc or ${getAppBin(context)} completions bash --script or ${getAppBin(context)} completions bash >> ~/.bashrc or ${getAppBin(context)} completions bash >> ~/.bash_profile on OSX. \\`\n)}\n\\${colors.cyan(\"_${getAppBin(context)}_completions()\")}\n{\n local cur_word args type_list\n\n cur_word=\"\\\\\\${COMP_WORDS[COMP_CWORD]}\"\n args=(\"\\\\\\${COMP_WORDS[@]}\")\n\n \\${colors.gray(\"# Ask ${getAppTitle(context)} CLI to generate completions.\")}\n mapfile -t type_list < <(${getAppBin(context)} --get-completions \"\\\\\\${args[@]}\")\n mapfile -t COMPREPLY < <(compgen -W \"$( printf '%q ' \"\\\\\\${type_list[@]}\" )\" -- \"\\\\\\${cur_word}\" |\n awk '/ / { print \"\\\\\\\\\"\"$0\"\\\\\\\\\"\" } /^[^ ]+$/ { print $0 }')\n\n \\${colors.gray(\"# if no match was found, fall back to filename completion\")}\n if [ \\\\\\${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _${getAppBin(context)}_completions ${getAppBin(context)}\n\n\\${colors.gray(\"###-end-${getAppBin(context)}-completions-###\")}\n\\`); `}\n />\n <Spacing />\n <IfStatement condition={code`options.config`}>\n <VarDeclaration\n let\n name=\"configFilePath\"\n type=\"string\"\n initializer={code`options.config === true ? \"~/.bashrc\" : options.config`}\n />\n <Spacing />\n <IfStatement condition={code`configFilePath.startsWith(\"~\")`}>\n {code`configFilePath = join(os.homedir(), configFilePath.replace(\"~\", \"\")); `}\n </IfStatement>\n <Spacing />\n <VarDeclaration\n let\n name=\"configFileContent\"\n type=\"string\"\n initializer={code`\"\";`}\n />\n <Spacing />\n {code`try {\n configFileContent = await readFile(configFilePath, \"utf8\");\n } catch (error) {\n if (error.code === \"ENOENT\") {\n // If the file doesn't exist, we can create it later when writing the completion script.\n warn(\\`Configuration file \\${colors.bold(configFilePath)} does not exist. It will be created when the completion script is written.\\`);\n } else {\n return { error };\n }\n }\n\n await writeFile(configFilePath, \\`\\${configFileContent}\\\\n\\\\n\\${stripAnsi(completions)}\\`);\n\n success(\\`${getAppTitle(context)} Bash completion script has been generated and appended to \\${colors.bold(configFilePath)}. Please restart your terminal or run \\`source \\${configFilePath}\\` to apply the changes.\\`); `}\n </IfStatement>\n <Spacing />\n <IfStatement condition={code`options.script`}>\n {code`const outputPath = options.script === true ? \"${getAppBin(context)}-completions.bash\" : options.script;\n await writeFile(outputPath, stripAnsi(completions));\n\n success(\\`${getAppTitle(context)} Bash completion script has been generated at \\${colors.bold(outputPath)}.\\`);`}\n </IfStatement>\n <Spacing />\n <IfStatement condition={code`!options.config && !options.script`}>\n {code`writeLine(\" ------------------------------------------------- \");\n writeLine(completions);\n writeLine(\" ------------------------------------------------- \");`}\n </IfStatement>\n </FunctionDeclaration>\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AA4CA,SAAgBgB,yBAAyB;CACvC,MAAMC,UAAUV,eAAyC;AAEzD,QAAAW,gBACGT,gBAAc;EAAA,IACbU,OAAI;AAAA,UAAEJ,UAAUE,QAAQG,WAAW,eAAe,QAAQ,aAAa;;EACvEC,SAAS;GACP,WAAW,CAAC,KAAK;GACjB,oBAAoB,CAAC,YAAY,YAAW;GAC7C;EACDC,gBAAgB,EACd,uBAAuB;GACrB;GACA;GAC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A;OAAAY,gBACPhB,aAAW;QAAC+B,WAAWjC,IAAI;QAAoCuB,UAC7DvB,IAAI;;;QAE6D,CAAA;OAAA;;KAAA,CAAA;IAAA;;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"bash-command.mjs","names":["code","FunctionDeclaration","IfStatement","InterfaceDeclaration","VarDeclaration","ReflectionKind","Spacing","usePowerlines","InterfaceMember","TypescriptFile","TSDoc","TSDocDefaultValue","TSDocRemarks","getAppBin","getAppTitle","joinPaths","snakeCase","CompletionDirective","exec","BashCompletionsCommand","context","_$createComponent","path","entryPath","imports","builtinImports","children","heading","name","type","string","defaultValue","optional","async","parameters","initializer","CompletionDirectiveError","CompletionDirectiveNoSpace","CompletionDirectiveNoFileComp","CompletionDirectiveFilterFileExt","CompletionDirectiveFilterDirs","CompletionDirectiveKeepOrder","condition","_$memo"],"sources":["../../src/components/bash-command.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code } from \"@alloy-js/core\";\nimport {\n FunctionDeclaration,\n IfStatement,\n InterfaceDeclaration,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport {\n InterfaceMember,\n TypescriptFile\n} from \"@powerlines/plugin-alloy/typescript\";\nimport {\n TSDoc,\n TSDocDefaultValue,\n TSDocRemarks\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { getAppBin, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path\";\nimport { snakeCase } from \"@stryke/string-format/snake-case\";\nimport { CompletionDirective } from \"../helpers\";\nimport { exec } from \"../helpers/complete-command\";\nimport type { CompletionsPluginContext } from \"../types/plugin\";\n\n/**\n * The Bash Completions commands' handler wrapper for the Shell Shock project.\n */\nexport function BashCompletionsCommand() {\n const context = usePowerlines<CompletionsPluginContext>();\n\n return (\n <TypescriptFile\n path={joinPaths(context.entryPath, \"completions\", \"bash\", \"command.ts\")}\n imports={{\n \"node:os\": [\"os\"],\n \"node:fs/promises\": [\"readFile\", \"writeFile\"]\n }}\n builtinImports={{\n \"shell-shock:console\": [\n \"colors\",\n \"writeLine\",\n \"success\",\n \"warn\",\n \"stripAnsi\"\n ]\n }}>\n <TSDoc heading=\"Options for the Bash completions command.\" />\n <InterfaceDeclaration export name=\"BashCompletionsOptions\">\n <TSDoc heading=\"The path to write the completion script to.\">\n <TSDocRemarks>{`If no extension is provided, the \\`.bash\\` extension will be used.`}</TSDocRemarks>\n <TSDocDefaultValue\n type={ReflectionKind.string}\n defaultValue={`${getAppBin(context)}-completions.bash`}\n />\n </TSDoc>\n <InterfaceMember name=\"script\" optional type=\"string | true\" />\n <Spacing />\n <TSDoc heading=\"The Bash configuration file to append the completion script to.\">\n <TSDocRemarks>{`The generated completion script will be appended to the specified configuration file. Possible values for the Bash configuration file include: \\\\n- \\`~/.bashrc\\` \\\\n- \\`~/.bash_profile\\``}</TSDocRemarks>\n <TSDocDefaultValue\n type={ReflectionKind.string}\n defaultValue=\"~/.bashrc\"\n />\n </TSDoc>\n <InterfaceMember name=\"config\" optional type=\"string | true\" />\n </InterfaceDeclaration>\n <Spacing />\n <TSDoc heading=\"Handler logic for the \\`completions bash\\` command.\"></TSDoc>\n <FunctionDeclaration\n export\n default\n async\n name=\"handler\"\n parameters={[{ name: \"options\", type: \"BashCompletionsOptions\" }]}>\n <VarDeclaration\n const\n name=\"completions\"\n type=\"string\"\n initializer={code`# bash completion for ${getAppTitle(context)}\n\n# Define shell completion directives\nreadonly ShellCompDirectiveError=${CompletionDirective.CompletionDirectiveError}\nreadonly ShellCompDirectiveNoSpace=${\n CompletionDirective.CompletionDirectiveNoSpace\n }\nreadonly ShellCompDirectiveNoFileComp=${\n CompletionDirective.CompletionDirectiveNoFileComp\n }\nreadonly ShellCompDirectiveFilterFileExt=${\n CompletionDirective.CompletionDirectiveFilterFileExt\n }\nreadonly ShellCompDirectiveFilterDirs=${\n CompletionDirective.CompletionDirectiveFilterDirs\n }\nreadonly ShellCompDirectiveKeepOrder=${\n CompletionDirective.CompletionDirectiveKeepOrder\n }\n\n# Function to debug completion\n__${snakeCase(getAppBin(context))}_debug() {\n if [[ -n \\${BASH_COMP_DEBUG_FILE:-} ]]; then\n echo \"$*\" >> \"\\${BASH_COMP_DEBUG_FILE}\"\n fi\n}\n\n# Function to handle completions\n__${snakeCase(getAppBin(context))}_complete() {\n local cur prev words cword\n _get_comp_words_by_ref -n \"=:\" cur prev words cword\n\n local requestComp out directive\n\n # Build the command to get completions\n requestComp=\"${exec} complete -- \\${words[@]:1}\"\n\n # Add an empty parameter if the last parameter is complete\n if [[ -z \"$cur\" ]]; then\n requestComp=\"$requestComp ''\"\n fi\n\n # Get completions from the program\n out=$(eval \"$requestComp\" 2>/dev/null)\n\n # Extract directive if present\n directive=0\n if [[ \"$out\" == *:* ]]; then\n directive=\\${out##*:}\n out=\\${out%:*}\n fi\n\n # Process completions based on directive\n if [[ $((directive & $ShellCompDirectiveError)) -ne 0 ]]; then\n # Error, no completion\n return\n fi\n\n # Apply directives\n if [[ $((directive & $ShellCompDirectiveNoSpace)) -ne 0 ]]; then\n compopt -o nospace\n fi\n if [[ $((directive & $ShellCompDirectiveKeepOrder)) -ne 0 ]]; then\n compopt -o nosort\n fi\n if [[ $((directive & $ShellCompDirectiveNoFileComp)) -ne 0 ]]; then\n compopt +o default\n fi\n\n # Handle file extension filtering\n if [[ $((directive & $ShellCompDirectiveFilterFileExt)) -ne 0 ]]; then\n local filter=\"\"\n for ext in $out; do\n filter=\"$filter|$ext\"\n done\n filter=\"\\\\.($filter)\"\n compopt -o filenames\n COMPREPLY=( $(compgen -f -X \"!$filter\" -- \"$cur\") )\n return\n fi\n\n # Handle directory filtering\n if [[ $((directive & $ShellCompDirectiveFilterDirs)) -ne 0 ]]; then\n compopt -o dirnames\n COMPREPLY=( $(compgen -d -- \"$cur\") )\n return\n fi\n\n # Process completions\n local IFS=$'\\\\n'\n local tab=$(printf '\\\\t')\n\n # Parse completions with descriptions\n local completions=()\n while read -r comp; do\n if [[ \"$comp\" == *$tab* ]]; then\n # Split completion and description\n local value=\\${comp%%$tab*}\n local desc=\\${comp#*$tab}\n completions+=(\"$value\")\n else\n completions+=(\"$comp\")\n fi\n done <<< \"$out\"\n\n # Return completions\n COMPREPLY=( $(compgen -W \"\\${completions[*]}\" -- \"$cur\") )\n}\n\n# Register completion function\ncomplete -F __${snakeCase(getAppBin(context))}_complete ${getAppBin(context)}\n\\`); `}\n />\n <Spacing />\n <IfStatement condition={code`options.config`}>\n <VarDeclaration\n let\n name=\"configFilePath\"\n type=\"string\"\n initializer={code`options.config === true ? \"~/.bashrc\" : options.config`}\n />\n <Spacing />\n <IfStatement condition={code`configFilePath.startsWith(\"~\")`}>\n {code`configFilePath = join(os.homedir(), configFilePath.replace(\"~\", \"\")); `}\n </IfStatement>\n <Spacing />\n <VarDeclaration\n let\n name=\"configFileContent\"\n type=\"string\"\n initializer={code`\"\";`}\n />\n <Spacing />\n {code`try {\n configFileContent = await readFile(configFilePath, \"utf8\");\n } catch (error) {\n if (error.code === \"ENOENT\") {\n // If the file doesn't exist, we can create it later when writing the completion script.\n warn(\\`Configuration file \\${colors.bold(configFilePath)} does not exist. It will be created when the completion script is written.\\`);\n } else {\n return { error };\n }\n }\n\n await writeFile(configFilePath, \\`\\${configFileContent}\\\\n\\\\n\\${stripAnsi(completions)}\\`);\n\n success(\\`${getAppTitle(context)} Bash completion script has been generated and appended to \\${colors.bold(configFilePath)}. Please restart your terminal or run \\`source \\${configFilePath}\\` to apply the changes.\\`); `}\n </IfStatement>\n <Spacing />\n <IfStatement condition={code`options.script`}>\n {code`const outputPath = options.script === true ? \"${getAppBin(context)}-completions.bash\" : options.script;\n await writeFile(outputPath, stripAnsi(completions));\n\n success(\\`${getAppTitle(context)} Bash completion script has been generated at \\${colors.bold(outputPath)}.\\`);`}\n </IfStatement>\n <Spacing />\n <IfStatement condition={code`!options.config && !options.script`}>\n {code`writeLine(\" ------------------------------------------------- \");\n writeLine(completions);\n writeLine(\" ------------------------------------------------- \");`}\n </IfStatement>\n </FunctionDeclaration>\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA+CA,SAAgBmB,yBAAyB;CACvC,MAAMC,UAAUb,eAAyC;AAEzD,QAAAc,gBACGZ,gBAAc;EAAA,IACba,OAAI;AAAA,UAAEP,UAAUK,QAAQG,WAAW,eAAe,QAAQ,aAAa;;EACvEC,SAAS;GACP,WAAW,CAAC,KAAK;GACjB,oBAAoB,CAAC,YAAY,YAAW;GAC7C;EACDC,gBAAgB,EACd,uBAAuB;GACrB;GACA;GACA;GACA;GACA;GAAW,EAEd;EAAA,IAAAC,WAAA;AAAA,UAAA;IAAAL,gBACAX,OAAK,EAACiB,SAAO,6CAAA,CAAA;IAAAN,gBACblB,sBAAoB;KAAA,UAAA;KAAQyB,MAAI;KAAA,IAAAF,WAAA;AAAA,aAAA;OAAAL,gBAC9BX,OAAK;QAACiB,SAAO;QAAA,IAAAD,WAAA;AAAA,gBAAA,CAAAL,gBACXT,cAAY,EAAAc,UAAE,sEAAoE,CAAA,EAAAL,gBAClFV,mBAAiB;UAAA,IAChBkB,OAAI;AAAA,kBAAExB,eAAeyB;;UAAM,IAC3BC,eAAY;AAAA,kBAAE,GAAGlB,UAAUO,QAAQ,CAAA;;UAAmB,CAAA,CAAA;;QAAA,C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