Jump to content

Show line count in clipboard viewer


Recommended Posts

@luckman212 We intentionally don't include line count, because everyone's definition is different; Does it depend on page width? Does it only include new lines?

 

It's too ambiguous, while word and character count are much more useful metrics to know how large the text snippet you're copying is.

 

Cheers,
Vero

Link to comment
Share on other sites

@Vero I know what you mean about newlines being treated differently by different OS'es e.g. Mac vs Windows. But if we confine it to just macOS (since we're only talking Alfred here) the definition is pretty clear: it should be 1 + the count of the "0A" hex bytes in a block of text (excluding a final trailing newline if there is one). I'm looking for the same output that would be shown by this bash script:

wc -l <<< "${clipboard%$'\n'}"

Not sure what page width has to do with it?

 

I'll give you a simple use case (this happened to me yesterday which is what prompted me to post this request). Let's say someone sends you a list of email addresses, and you've copied them to the clipboard. You want to know how many email addresses you have. It would be great if I could just flip open Alfred's clipboard history and see it there without having to paste this into Sublime Text to see the linecount etc.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...