aboutsummaryrefslogtreecommitdiff
path: root/completions
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-10-31 21:02:15 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-10-31 21:02:15 -0700
commit64d3927879e9af94eaf1aa7f304ab28f03e7a6bb (patch)
tree102278762c1741416e064415aa7e4e2c1a6325cf /completions
parent49ad70b11ca03739887e7b65835d3aab6bb652e7 (diff)
downloadbun-64d3927879e9af94eaf1aa7f304ab28f03e7a6bb.tar.gz
bun-64d3927879e9af94eaf1aa7f304ab28f03e7a6bb.tar.zst
bun-64d3927879e9af94eaf1aa7f304ab28f03e7a6bb.zip
[CLI] Add completions for Fish
Diffstat (limited to 'completions')
-rw-r--r--completions/bun.fish49
1 files changed, 49 insertions, 0 deletions
diff --git a/completions/bun.fish b/completions/bun.fish
new file mode 100644
index 000000000..d3484a78c
--- /dev/null
+++ b/completions/bun.fish
@@ -0,0 +1,49 @@
+function __fish__get_bun_bins
+ string split ' ' (bun getcompletes b)
+end
+
+function __fish__get_bun_scripts
+ string split ' ' (bun getcompletes s)
+end
+
+
+set -l bun_builtin_cmds dev create help bun upgrade discord run
+set -l bun_builtin_cmds_without_run dev create help bun upgrade discord
+set -l bun_builtin_cmds_without_create dev help bun upgrade discord run
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_run; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_use_subcommand" -a '(__fish__get_bun_bins)' -d 'package bin'
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_run; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_use_subcommand" -a '(__fish__get_bun_scripts)' -d 'script'
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_run; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_seen_subcommand_from run" -a '(__fish__get_bun_bins)' -d 'package bin'
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_run; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_seen_subcommand_from run" -a '(__fish__get_bun_scripts)' -d 'script'
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts) and __fish_use_subcommand" -a 'run' -d 'Run a script or bin'
+
+complete -c bun -n "not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts);" -F -s 'u' -l 'origin' -r -d 'Server URL. Rewrites import paths'
+
+complete -c bun -n "not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts);" -F -s 'p' -l 'port' -r -d 'Port number to start server from'
+
+complete -c bun -n "not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts);" -F -s 'd' -l 'define' -r -d 'Substitute K:V while parsing, e.g. --define process.env.NODE_ENV:\"development\"'
+
+complete -c bun -n "not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts);" -F -s 'e' -l 'external' -r -d 'Exclude module from transpilation (can use * wildcards). ex: -e react'
+
+complete -c bun -n "not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts);" -F -l 'use' -r -d 'Use a framework (ex: next)'
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts) and __fish_use_subcommand" -a 'dev' -d 'Start dev server'
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_use_subcommand" -F -a 'create' -d 'Create a new project from a template'
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_create next react; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_seen_subcommand_from create" -f -a 'next' -d 'Create a new Next.js project'
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_create next react; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_seen_subcommand_from create" -f -a 'react' -d 'Create a new React project'
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_create; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_seen_subcommand_from create next" -F
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_use_subcommand" -x -a 'upgrade' -d 'Upgrade Bun to the latest version'
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_use_subcommand" -x -a '--help' -d 'See all commands and flags'
+
+complete -c bun -n "not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_use_subcommand" -x -a 'discord' -d 'Open Bun\'s Discord server'
+