Open sohang3112 opened 4 months ago
@psibi I would like to work on this & open a Pull Request to add this argument, please confirm that you would be interested in merging a PR for this.
Sounds good to me.
@psibi Ok I'll start working on this. There don't seem to be any Contributing guidelines in this repo - is there anything I should keep in mind while making my PR?
I think you might have to update ci as I haven't touched it in quite sometime. Probably convert it to use GitHub actions if that makes things easier.
@psibi I'm not familiar with Azure CI - can you please explain what's the role of .azure/azure-linux-musl.yaml
and .azure/azure-linux-template.yaml
? What does musl
stand for or mean? I assume musl YAML is using the template YAML, but I'm not sure how - can you point out on which lines in musl YAML is template YAML file being imported & used?
@psibi I'm having an issue with tldr
built from source (running with stack exec tldr
) - please help with this issue.
In Ubuntu apt repository, tldr
command is an older version of tldr-hs
. Commands like --version
and --update
work in the Ubuntu tldr
, but not in the version built from source:
# tldr from Ubuntu apt package
$ tldr --version
0.6.4
# running tldr built from source
$ stack exec tldr --version
Invalid option `--version`
Usage: stack exec COMMAND
The commands are defined in src/Tldr/App.hs
. For example: (note that this is original source code only, haven't changed anything in any Haskell files):
versionOption :: Parser (a -> a)
versionOption = infoOption (showVersion version) (long "version" <> short 'v' <> help "Show version")
Steps followed to build and run:
stack setup # install GHC Haskell compiler
stack build # build executable, installing dependencies
stack test # install test dependencies and run all tests - all tests pass
stack exec tldr # runs fine
stack exec tldr --version # error --version not recognized (full output shown above)
Any idea why the defined commands in the source code are not working? Am I misunderstanding something about building and running from the source? Or is this a bug?
What does musl stand for or mean?
Musl based stack is used for building static Haskell binary.
I assume musl YAML is using the template YAML, but I'm not sure how - can you point out on which lines in musl YAML is template YAML file being imported & used?
I don't think any YAML file is being important. You can probably see an example here of how to use github actions: https://github.com/fakedata-haskell/fakedata/blob/master/.github/workflows/tests.yml
Commands like --version and --update work in the Ubuntu tldr, but not in the version built from source:
Can you try this:
stack exec tldr -- --version
Or is this a bug?
I don't think so as I have latest version in my machine:
❯ tldr --version
0.9.2
stack exec tldr -- --version
Thanks - that worked 👍
In the output of
tldr tldr
, this is the last sample command (it must be present in the othertldr
clients):This
--list
CLI argument should also be added totldr-hs
.