Skip to content

Commit ffa096c

Browse files
committed
shell completions
1 parent cfa21f2 commit ffa096c

4 files changed

Lines changed: 14 additions & 7 deletions

File tree

misc/completions/ark-completion.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ _ark_gen_opts_arg="--output-filename -o --scan-buffer -b --output-format -f --ma
1515
--pattern-regex -x --include-ext -i --exclude-dir-regex -g --exclude-file-regex -G \
1616
--exclude-ext -e --exclude-dir -E"
1717
_ark_mcp_flags="--skip-non-utf8 -s --delete-comments -D"
18-
_ark_mcp_opts_arg="--root -r --port -p --scan-buffer -b --mask-secrets -m --allow-gitignore -a \
18+
_ark_mcp_opts_arg="--root -r --type -t --http-port -p --scan-buffer -b --mask-secrets -m --allow-gitignore -a \
1919
--additionally-ignorerule -A --ignore-dotfile -d --pattern-regex -x --include-ext -i \
2020
--exclude-dir-regex -g --exclude-file-regex -G --exclude-ext -e --exclude-dir -E"
2121
_ark_subcommands="mcp-server"
@@ -78,7 +78,9 @@ _ark_bash() {
7878
COMPREPLY=( $(compgen -W "go js ts py java c cpp h txt md html css xml yml yaml json" -- "$cur") ); return 0 ;;
7979
--output-filename|-o|--additionally-ignorerule|-A|--root|-r)
8080
_filedir; return 0 ;;
81-
--port|-p)
81+
--type|-t)
82+
COMPREPLY=( $(compgen -W "stdio http" -- "$cur") ); return 0 ;;
83+
--http-port|-p)
8284
COMPREPLY=( $(compgen -W "8008 8522 8080 9000" -- "$cur") ); return 0 ;;
8385
--scan-buffer|-b)
8486
COMPREPLY=( $(compgen -W "1M 5M 10M 100K" -- "$cur") ); return 0 ;;
@@ -123,7 +125,8 @@ _ark_zsh() {
123125

124126
local -a mcp_opts=(
125127
'--root[-r]:root directory:_files -/'
126-
'--port[-p]:port number:(8008 8522 8080 9000)'
128+
'--type[-t]:mcp type:(stdio http)'
129+
'--http-port[-p]:port number:(8008 8522 8080 9000)'
127130
'--scan-buffer[-b]:buffer size:(1M 5M 10M 100K)'
128131
'--mask-secrets[-m]:on/off:(on off)'
129132
'--allow-gitignore[-a]:on/off:(on off)'

misc/completions/bash/ark-completion.bash

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ _gen_opts="--output-filename -o --scan-buffer -b --output-format -f --mask-secre
88
--pattern-regex -x --include-ext -i --exclude-dir-regex -g --exclude-file-regex -G \
99
--exclude-ext -e --exclude-dir -E"
1010
_mcp_flags="--skip-non-utf8 -s --delete-comments -D"
11-
_mcp_opts="--root -r --port -p --scan-buffer -b --mask-secrets -m --allow-gitignore -a \
11+
_mcp_opts="--root -r --type -t --http-port -p --scan-buffer -b --mask-secrets -m --allow-gitignore -a \
1212
--additionally-ignorerule -A --ignore-dotfile -d --pattern-regex -x --include-ext -i \
1313
--exclude-dir-regex -g --exclude-file-regex -G --exclude-ext -e --exclude-dir -E"
1414
_subcmds="mcp-server"
@@ -64,7 +64,8 @@ _ark() {
6464
--include-ext|-i|--exclude-ext|-e)
6565
COMPREPLY=( $(compgen -W "go js ts py java c cpp h txt md html css xml yml yaml json" -- "$cur") ); return ;;
6666
--output-filename|-o|--additionally-ignorerule|-A|--root|-r) _filedir; return ;;
67-
--port|-p) COMPREPLY=( $(compgen -W "8008 8522 8080 9000" -- "$cur") ); return ;;
67+
--type|-t) COMPREPLY=( $(compgen -W "stdio http" -- "$cur") ); return ;;
68+
--http-port|-p) COMPREPLY=( $(compgen -W "8008 8522 8080 9000" -- "$cur") ); return ;;
6869
--scan-buffer|-b) COMPREPLY=( $(compgen -W "1M 5M 10M 100K" -- "$cur") ); return ;;
6970
esac
7071

misc/completions/fish/ark.fish

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ end
4545
complete -c ark -n '__fish_seen_subcommand_from mcp-server' \
4646
-l root -s r -d 'Root directory' -r -f
4747
complete -c ark -n '__fish_seen_subcommand_from mcp-server' \
48-
-l port -s p -d 'Port' -a '8008 8522 8080 9000'
48+
-l type -s t -d 'Mcp Type' -a 'stdio http'
49+
complete -c ark -n '__fish_seen_subcommand_from mcp-server' \
50+
-l http-port -s p -d 'HttpPort' -a '8008 8522 8080 9000'
4951
complete -c ark -n '__fish_seen_subcommand_from mcp-server' \
5052
-l scan-buffer -s b -d 'Buffer size' -a '1M 5M 10M 100K'
5153
complete -c ark -n '__fish_seen_subcommand_from mcp-server' \

misc/completions/zsh/_ark

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ general_opts=(
2222

2323
mcp_opts=(
2424
'--root[-r]:root directory:_files -/'
25-
'--port[-p]:port number:(8008 8522 8080 9000)'
25+
'--type[-xtp]:mcp type:(stdio httpp)'
26+
'--http-port[-p]:port number:(8008 8522 8080 9000)'
2627
'--scan-buffer[-b]:buffer size:(1M 5M 10M 100K)'
2728
'--mask-secrets[-m]:on/off:(on off)'
2829
'--allow-gitignore[-a]:on/off:(on off)'

0 commit comments

Comments
 (0)