Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completions(bash, fish): tweak formatting #650

Merged
merged 8 commits into from
Aug 21, 2022

Commits on Aug 18, 2022

  1. completions(bash): add space after redirect operator

    Format with:
    
        shfmt -i 2 -ci -sr -kp
    
    `shfmt` usage:
    
        $ shfmt --version
        3.5.1
        $ shfmt --help
        usage: shfmt [flags] [path ...]
    
        shfmt formats shell programs. If the only argument is a dash ('-') or no
        arguments are given, standard input will be used. If a given path is a
        directory, all shell scripts found under that directory will be used.
    
          --version  show version and exit
    
          -l,  --list      list files whose formatting differs from shfmt's
          -w,  --write     write result to file instead of stdout
          -d,  --diff      error with a diff when the formatting differs
          -s,  --simplify  simplify the code
          -mn, --minify    minify the code to reduce its size (implies -s)
    
        Parser options:
    
          -ln, --language-dialect str  bash/posix/mksh/bats, default "auto"
          -p,  --posix                 shorthand for -ln=posix
          --filename str               provide a name for the standard input file
    
        Printer options:
    
          -i,  --indent uint       0 for tabs (default), >0 for number of spaces
          -bn, --binary-next-line  binary ops like && and | may start a line
          -ci, --case-indent       switch cases will be indented
          -sr, --space-redirects   redirect operators will be followed by a space
          -kp, --keep-padding      keep column alignment paddings
          -fn, --func-next-line    function opening braces are placed on a separate line
    
        Utilities:
    
          -f, --find   recursively find all shell files and print the paths
          --tojson     print syntax tree to stdout as a typed JSON
    
        For more information, see 'man shfmt' and https://github.com/mvdan/sh.
    ee7 committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    658137e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a200371 View commit details
    Browse the repository at this point in the history
  3. completions(fish): group __fish_use_subcommand completions

    This splits the subcommand from its options, but I think it's slightly
    more readable.
    ee7 committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    78aab9b View commit details
    Browse the repository at this point in the history
  4. completions(fish): order subcommands alphabetically

    Follow the output of `configlet --help`.
    ee7 committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    810fa8f View commit details
    Browse the repository at this point in the history
  5. completions(fish): order options alphabetically

    Again, reduce the visual diff between the completions and the output of
    `configlet --help`.
    ee7 committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    a5daa8e View commit details
    Browse the repository at this point in the history
  6. completions(fish): combine -xa

    ee7 committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    ef2b372 View commit details
    Browse the repository at this point in the history
  7. completions(fish): put lone -x at end

    Later, this will probably have an argument that suggests integers. For
    now, at least put `-x` closer to where `-xa` appears.
    ee7 committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    2c2b770 View commit details
    Browse the repository at this point in the history
  8. completions(fish): align

    ee7 committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    27e1da9 View commit details
    Browse the repository at this point in the history