On Thu, Aug 17, 2017 at 8:32 PM, Mark Volkmann <r.mark.volkm...@gmail.com>
wrote:

> Thanks Kurtis!
>
> Suppose I define a function like this:
>
> function foo --description 'Can you see this?'
>   echo in foo
> end
>
> Entering "functions --details foo" just outputs "stdin".
>

Add the verbose flag:

$ functions --verbose --details foo
stdin
n/a
0
scope-shadowing
Can you see this?


I'm new to fish. I don't yet know what a "completion argument function" is.
>

 You said "tab completion" so I assumed you were writing a completion
script using the `complete` command. See `man complete`; specifically the
`--arguments` option.

On Thu, Aug 17, 2017 at 10:20 PM, Kurtis Rader <kra...@skepticism.us> wrote:
>
>> On Thu, Aug 17, 2017 at 8:14 PM, Mark Volkmann <r.mark.volkm...@gmail.com
>> > wrote:
>>
>>> How is the value of --description for a function used?
>>>
>>
>> It is currently used in only one place by the core fish code: the `alias`
>> command.
>>
>>
>>> Is there some command where I can ask for the description of a given
>>> function?
>>>
>>
>> Yes: `functions --details $func_name`.
>>
>>
>>> Is there a way to cause the description to be displayed as part of tab
>>> completion?
>>>
>>
>> Yes, using the aforementioned `functions -details $func_name` command in
>> a completion argument function.
>>
>> --
>> Kurtis Rader
>> Caretaker of the exceptional canines Junior and Hank
>>
>
>
>
> --
> R. Mark Volkmann
> Object Computing, Inc.
>



-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to