Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement seq #45

Open
2 of 4 tasks
GrayJack opened this issue Sep 27, 2019 · 10 comments
Open
2 of 4 tasks

Implement seq #45

GrayJack opened this issue Sep 27, 2019 · 10 comments
Labels
A-tool Area: Binary tool E-easy Call for participation: Experience needed to fix: Easy / not much good first issue Good for newcomers Hacktoberfest Hacktoberfest

Comments

@GrayJack
Copy link
Owner

GrayJack commented Sep 27, 2019

This is a tracking issue for the seq util.

Required options and flags:

  • f (long: format)
  • s (long: separator)
  • t (long: terminator)
  • w (long: equal-width, visible-alias: fixed-width)

Notes:
¹ : Long name not defined on other implementation of this utility. Implementer must choose a long name.
² : Short name (one letter) not defined on other implementation of this utility. Implementer must choose. a short name

References

Seq Linux
Seq FreeBSD
Seq NetBSD
Seq DragonflyBSD

Unresolved questions:

None yet

History

The -w and -s were implemented by #125
Open issue for -f: #127

@GrayJack GrayJack added good first issue Good for newcomers Hacktoberfest Hacktoberfest labels Sep 27, 2019
@FrancisMurillo
Copy link

Hi, planning to work on this issue. Planning to do the following:

  1. Create a branch, cli/seq from master
  2. Create a seq member based on sleep
  3. Replicate man seq in terms of options and documentation
  4. Write code

Any other advice or guidelines such as testing as well?

@GrayJack
Copy link
Owner Author

GrayJack commented Sep 29, 2019

Yes one advice

Always drop manually everything that needs to when std::process::exit()

As for testing, I do not have something more strict because we have lots of stuff that the result depends on the running system configuration, and I have no idea how to create tests for these cases.

But overall, everything that are not those cases, I would like tests cases. I usually give very descriptive names for test functions like <function name>_<case>

Example:
I have a function called myfunc that takes one bool parameter, so my test function names would be myfunc_true and myfunc_false

I guess that's all that I can think on top of my head

Have fun with the project 😄

@yehohanan7
Copy link

Hi @GrayJack, not sure if @FrancisMurillo is working on this. I had few hours to work on this one, please review the PR -#125

@GrayJack
Copy link
Owner Author

GrayJack commented Sep 1, 2020

Just missing -f flag now

@GrayJack
Copy link
Owner Author

GrayJack commented Sep 1, 2020

I just notice that when all 3 args are the same (1 1 1, or 2 2 2) it wont print the value

With default seq

seq 1 1 1

Has output of
1

this version only exit without showing the number

@GrayJack GrayJack added A-tool Area: Binary tool E-easy Call for participation: Experience needed to fix: Easy / not much labels Dec 28, 2020
@lynnpepin
Copy link

Heya, I'd like to take a crack at adding the -f flag and fixing this behavior so seq 1 1 1 operates as expected!

@lynnpepin
Copy link

Hi @GrayJack I couldn't reproduce the 1 1 1 problem from the dev branch.

Running seq 1 1 1 returns 1, as expected, when built using MacOS and Linux targets.

@GrayJack
Copy link
Owner Author

GrayJack commented Oct 2, 2022

Hi @lynnpepin, I believe the error in the behavior was fixed on PR #154 , but the -f flag remains unimplemented

Sorry, I forgot to mention here that the issue was fixed.

@lynnpepin
Copy link

Understood! Focusing on the -f flag

@lynnpepin
Copy link

Hey @GrayJack I'm going to call it quits on implementing -f. Couldn't figure it out, and I've definitely overcommited a bit! I think I need to tackle some more Rust before trying again.

As it stands, a good first issue for anyone else!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tool Area: Binary tool E-easy Call for participation: Experience needed to fix: Easy / not much good first issue Good for newcomers Hacktoberfest Hacktoberfest
Projects
None yet
Development

No branches or pull requests

4 participants