Skip to content

Commit

Permalink
Include ZSH tab-completion file to bin/_scalafmt
Browse files Browse the repository at this point in the history
I'm not sure the best place for installation instructions to go.
Essentially, they're going to be exactly the same as those added to the
README, here:

https://github.com/coursier/coursier/pull/756/files

If someone tells me the best place for them to go, I'll add them.
  • Loading branch information
propensive committed Jan 27, 2018
1 parent 542a045 commit 46f30bc
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions bin/_scalafmt
@@ -0,0 +1,27 @@
#compdef scalafmt

_scalafmt() {
local -a cmds

_arguments -C \
{-h,--help}'[prints usage text]' \
{-v,--version}'[print version]' \
'--stdout[write formatted files to stdout]' \
'--git[if true, ignore files in .gitignore (default false)]:value:' \
'--exclude[file or directory, in which case all *.scala files are formatted]:value:_files' \
{-c,--config}'[a file path to .scalafmt.conf]:value:_files' \
'--config-str[configuration defined as a string]:value:' \
'--stdin[read from stdin and print to stdout]' \
'--no-stderr[do not use strerr for messages, output to stdout]' \
'--assume-filename[when using --stdin, use --assume-filename to hint to scalafmt that the input is an .sbt file]:value:' \
'--test[test for mis-formatted code, exits with status 1 on failure]' \
'--migrate2hocon[migrate .scalafmt CLI style configuration to hocon style configuration in .scalafmt.conf]:value:' \
'--diff[if set, only format edited files in git diff against master]' \
'--diff-branch[if set, only format edited files in git diff against provided branch]:value:' \
'--build-info[prints build information]' \
'--quiet[do not print out stuff to console]' \
'--debug[print out diagnostics to console]' \
'--non-interactive[disable fancy progress bar, useful in ci or sbt plugin]'
}

_scalafmt

0 comments on commit 46f30bc

Please sign in to comment.