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

add custom delimiter option #3

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

luckman212
Copy link

This is a verbatim copy of my old PR from main (abandoned?) fork - see zmwangx#17


One problem that I had was the delimiter of a single space was making it hard to integrate with some other logging tools that I also use. I wanted to use \t tab instead, but I went ahead and made this PR that adds a -d / --delim flag to allow any custom delimiter that might be desired.

Examples

ets --delim ' - '
ets -d '\t\t'
ets -d ':  '

One little neat trick you can do with this is create a delimiter that causes the terminal to beep when new lines are logged, e.g.

$ ping 1.1.1.1 | ets -d '\t\x07'

Hope this patch is ok, but let me know 👍

main.go Outdated Show resolved Hide resolved
@luckman212 luckman212 force-pushed the add-custom-delimiter branch from 6d6ad16 to 20bb4b1 Compare April 29, 2024 20:17
@gdubicki gdubicki merged commit 372a23a into gdubicki:master Apr 29, 2024
@gdubicki
Copy link
Owner

Thanks again! I’ll make a new release tomorrow.

@gdubicki
Copy link
Owner

I need a bit more time for the release - updating the man page is a nightmare an „interesting” time-travel-like experience… 🦕😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants