Sha256: 6312fc32958a945f931b356ab1a5281bfa9b3a4ba1c400e36a77bf4a6f216795

Contents?: true

Size: 1007 Bytes

Versions: 239

Compression:

Stored size: 1007 Bytes

Contents

# This function was taken from https://github.com/Carthage/Carthage/blob/master/Source/Scripts/carthage-fish-completion
function __fish_fastlane_needs_subcommand
  set cmd (commandline -opc)
  if [ (count $cmd) -eq 1 -a $cmd[1] = 'fastlane' ]
    return 0
  end
    return 1
end

if test -e "Fastfile"
  set file "Fastfile"
else if test -e "fastlane/Fastfile"
  set file "fastlane/Fastfile"
else if test -e ".fastlane/Fastfile"
  set file ".fastlane/Fastfile"
else
  exit 1
end

set commands (string match --regex '.*lane\ \:(?!private_)([^\s]*)\ do' (cat $file))

set commands_string

# Fish returns the fully matched string, plus the capture group. The actual captured value
# is every other line, starting at line 2.
set use_command false

for line in $commands
  if [ $use_command = true ]
    set commands_string "$commands_string $line"
    set use_command false
  else
    set use_command true
  end
end

complete -c fastlane -n '__fish_fastlane_needs_subcommand' -a (string trim $commands_string) -f

Version data entries

239 entries across 239 versions & 1 rubygems

Version Path
fastlane-2.58.0.beta.20170920010003 fastlane/lib/assets/completions/completion.fish
fastlane-2.57.2 fastlane/lib/assets/completions/completion.fish
fastlane-2.57.1 fastlane/lib/assets/completions/completion.fish
fastlane-2.58.0.beta.20170919010003 fastlane/lib/assets/completions/completion.fish
fastlane-2.57.0 fastlane/lib/assets/completions/completion.fish
fastlane-2.57.0.beta.20170918010003 fastlane/lib/assets/completions/completion.fish
fastlane-2.57.0.beta.20170917010003 fastlane/lib/assets/completions/completion.fish
fastlane-2.57.0.beta.20170916010003 fastlane/lib/assets/completions/completion.fish
fastlane-2.57.0.beta.20170915010002 fastlane/lib/assets/completions/completion.fish
fastlane-2.57.0.beta.20170914010003 fastlane/lib/assets/completions/completion.fish
fastlane-2.57.0.beta.20170913010002 fastlane/lib/assets/completions/completion.fish
fastlane-2.56.0 fastlane/lib/assets/completions/completion.fish
fastlane-2.56.0.beta.20170912010003 fastlane/lib/assets/completions/completion.fish
fastlane-2.56.0.beta.20170911010003 fastlane/lib/assets/completions/completion.fish
fastlane-2.56.0.beta.20170910010002 fastlane/lib/assets/completions/completion.fish
fastlane-2.56.0.beta.20170909010003 fastlane/lib/assets/completions/completion.fish
fastlane-2.56.0.beta.20170908010003 fastlane/lib/assets/completions/completion.fish
fastlane-2.56.0.beta.20170907010003 fastlane/lib/assets/completions/completion.fish
fastlane-2.56.0.beta.20170906010003 fastlane/lib/assets/completions/completion.fish
fastlane-2.56.0.beta.20170905010003 fastlane/lib/assets/completions/completion.fish