flip(1) – reverse data #48

Open
opened 2024-02-07 20:38:19 -07:00 by emma · 8 comments
Owner

rev(1) should reverse lines, arbitrarily-separated values (à la GNU tac(1)), or words, depending on the flags specified. These lines will be supplied from the standard input.

rev [-w] [-s separator]

This offloads functionality from #22.

`rev(1)` should reverse lines, arbitrarily-separated values (à la GNU `tac(1)`), or words, depending on the flags specified. These lines will be supplied from the standard input. `rev [-w] [-s separator]` This offloads functionality from #22.
emma added the
enhancement
help wanted
labels 2024-02-07 20:38:19 -07:00
emma added the
question
label 2024-02-07 20:40:04 -07:00
Author
Owner

Turns out it needs a different name since rev(1) is a GNU utility.

Turns out it needs a different name since `rev(1)` is a GNU utility.
Owner

I think reverse(1) would be fine.

Arbitrary delimiter(s) (e.g. out hello world | reverse -d e -d o would print hellow odlr) or -w for whitespace sounds good to me, if that"s what you mean by the usage string.

I think reverse(1) would be fine. Arbitrary delimiter(s) (e.g. `out hello world | reverse -d e -d o` would print `hellow odlr`) or `-w` for whitespace sounds good to me, if that"s what you mean by the usage string.
Author
Owner

My though was that -w is for words and -d was for arbitrary delimiters, defaulting to newlines.

My though was that `-w` is for words and `-d` was for arbitrary delimiters, defaulting to newlines.
Owner

That seems equivalent functionally to what I figured.

That seems equivalent functionally to what I figured.
Author
Owner

That seems equivalent functionally to what I figured.

It is, isn’t it! Sounds good to me.

> That seems equivalent functionally to what I figured. It is, isn’t it! Sounds good to me.
Author
Owner

Now we just need a better name.

Now we just need a better name.
Author
Owner

@trinity what do you think of flip(1)?

@trinity what do you think of `flip(1)`?
Owner

I like it.

I like it.
emma changed title from `rev(1)` – reverse data to `flip(1)` – reverse data 2024-07-16 09:45:47 -06:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: bonsai/harakit#48
No description provided.