nyagos icon indicating copy to clipboard operation
nyagos copied to clipboard

Add help option to all command !

Open hymkor opened this issue 7 years ago • 3 comments

By /? , /help , -help or -h

hymkor avatar Jan 22 '18 08:01 hymkor

I tried to add a help option easily. (There are some parts where the implementation is not clean, but ...)

https://github.com/zetamatta/nyagos/compare/master...tomato3713:add-build-in-cmd-help

It works in the following way.

$ pwd -h
Print the current working drive and directory.

$ pwd -help
Usage: pwd -N (N:digit) -L -P

    Print the current working drive and directory.
    Options:
        -N: N is digit. Print the N-previous directory.
        -L: Use PWD from environment, even if it contains symlinks. (default)
        -P: avoid symlinks.

If this works, why not add a help option for commands other than pwd as well?

tomato3713 avatar Nov 02 '20 15:11 tomato3713

Not a bad idea. But, Nyagos has many commands to change. It will be late to start changes.

hymkor avatar Nov 03 '20 02:11 hymkor

Would you like to change commands before adding help option?

tomato3713 avatar Nov 03 '20 12:11 tomato3713