Replies: 1 comment 5 replies
-
This description is either taken from the man page or, for functions, from the For example if you define function custom_command --description "This is my custom command"
echo Hello I am custom_command
end You'll see it described as "This is my custom command" - but only once it's loaded, so if it's in a file in ~/.config/fish/functions/ it won't appear until you run it once. That's also why the completions won't work - before you try to complete the command, i.e. do |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. I am creating a Fish completion script for my own command. I want to add a description for my command when a list of options comes up, but I am unsure how to do this. Currently, the description just says
(command)
.I already know I can use the
--description
flag to add a description to subcommands, but I want to do this for my top-level command. I tried to docomplete -c $progname -d "<description here>"
and looked at theshare/completions
directory in this repository but I could not find out how to do it.Here is a screenshot displaying my 'custom-command'. You can see that most of the other commands' descriptions have an actual description, but my 'custom-command' just has
![2023-05-21-185752_1573x74_scrot](https://private-user-images.githubusercontent.com/89617856/239774635-27fcfb55-1080-436b-a497-c5ac4db2b117.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxOTM3ODQsIm5iZiI6MTcxOTE5MzQ4NCwicGF0aCI6Ii84OTYxNzg1Ni8yMzk3NzQ2MzUtMjdmY2ZiNTUtMTA4MC00MzZiLWE0OTctYzVhYzRkYjJiMTE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI0VDAxNDQ0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI4OTYwZjI1YzE4ZmVmYTBhMTg1YThhMzhkZTQ2YmY5NzA3ZWZmYzJjOWYwYjkyOWEyMDJiMTFkNWIwOThhN2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.dg8j6yN5f7iBlvJlVKUpU2HKD89KMekN29XS92kPJMw)
(command)
How can I add a custom description for this command. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions