Skip to content

Commit 304589e

Browse files
JordanMartinezsafareli
authored andcommitted
Clean up docs in various modules (#9)
* Clean up docs in various modules - Builder module was looked through carefully - Other modules just expose all of their docs. Othe things like (@word@) were not converted to `word` or things like that * Remove unneeded escape characters in helper hsubparser docs * Convert code fragment to markdown syntax * Add missing pipe character * Document `some` and `many` * Show all docs of Text.PrettyPrint.Leijen
1 parent 44ab603 commit 304589e

File tree

7 files changed

+571
-539
lines changed

7 files changed

+571
-539
lines changed

src/Options/Applicative/BashCompletion.purs

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
-- | You don't need to import this module to enable bash completion.
2-
--
3-
-- See
4-
-- <http://github.com/pcapriotti/optparse-applicative/wiki/Bash-Completion the wiki>
5-
-- for more information on bash completion.
2+
-- |
3+
-- | See [the wiki](http://github.com/pcapriotti/optparse-applicative/wiki/Bash-Completion)
4+
-- | for more information on bash completion.
65
module Options.Applicative.BashCompletion
76
( bashCompletionParser
87
) where
@@ -85,7 +84,7 @@ bashCompletionQuery pinfo pprefs richness ws i _ = case runCompletion compl ppre
8584
Just (Left (Tuple (SomeParser e) a))
8685
-> runExists (\p -> list_options a p) e
8786
Just (Right c)
88-
-> run_completer c
87+
-> run_completer c
8988
Nothing
9089
-> pure []
9190
where
@@ -207,24 +206,23 @@ bashCompletionScript prog progn = pure
207206
, ""
208207
, "complete -o filenames -F _" <> progn <> " " <> progn ]
209208

210-
{-
211-
/Note/: Fish Shell
212-
213-
Derived from Drezil's post in #169.
214-
215-
@
216-
commandline
217-
-c or --cut-at-cursor only print selection up until the current cursor position
218-
-o or --tokenize tokenize the selection and print one string-type token per line
219-
@
220-
221-
We tokenize so that the call to count (and hence --bash-completion-index)
222-
gets the right number use cut-at-curstor to not bother sending anything
223-
after the cursor position, which allows for completion of the middle of
224-
words.
225-
226-
Tab characters separate items from descriptions.
227-
-}
209+
-- |
210+
-- | **Note**: Fish Shell
211+
-- |
212+
-- | Derived from Drezil's post in #169.
213+
-- |
214+
-- | ```
215+
-- | commandline
216+
-- | -c or --cut-at-cursor only print selection up until the current cursor position
217+
-- | -o or --tokenize tokenize the selection and print one string-type token per line
218+
-- | ```
219+
-- |
220+
-- | We tokenize so that the call to count (and hence --bash-completion-index)
221+
-- | gets the right number use cut-at-curstor to not bother sending anything
222+
-- | after the cursor position, which allows for completion of the middle of
223+
-- | words.
224+
-- |
225+
-- | Tab characters separate items from descriptions.
228226
fishCompletionScript :: String -> String -> Effect (Array String)
229227
fishCompletionScript prog progn = pure
230228
[ " function _" <> progn

0 commit comments

Comments
 (0)