oh-my-fish / oh-my-fish-legacy

Oh My Fish!
MIT License
13 stars 2 forks source link

Add more helping texts #547

Closed gblmarquez closed 9 years ago

gblmarquez commented 9 years ago

Actions implemented:

ghost commented 9 years ago

@gblmarquez Great work :+1: and really looking forward getting this merged.

bpinto commented 9 years ago

If you add this to of.fish you have --help working for subcommands:

function omf -d "Oh My Fish"
  if test (count $argv) -eq 0
    omf.help "main"; and return 0
  else
    if test $argv[-1] = "--help"
      omf.help $argv[1..-2]; and return 0
    end
  end
derekstavis commented 9 years ago

I had an issue calling omf --help without parameters:

derek@derek-mbp ~/.l/s/omf> omf --help
fish: Could not expand string '$argv[1..-2]'
/Users/derek/.local/share/omf/pkg/omf/omf.fish (line 41):       omf.help $argv[1..-2]; and return 0
                                                                         ^
in function 'omf',
    called on standard input,
    with parameter list '--help'
bpinto commented 9 years ago

Yeah... I had imagined this...

We need to either send "main" if there is only one argument when --help is used, or to remove the need to use "main" altogether.

derekstavis commented 9 years ago

Perfect. Fetched the branch and it works. Now can you rebase and split the commits into logic sequence?

gblmarquez commented 9 years ago

@derekstavis I dont how to do it fast, I'll read the docs @bpinto sent me to do it.