luckman212 Posted May 4, 2021 Share Posted May 4, 2021 Currently, the clipboard viewer (very helpfully) shows the word and character counts: Just a suggestion: it would be useful to also display the line count here, if possible! Link to comment Share on other sites More sharing options...
giovanni Posted May 4, 2021 Share Posted May 4, 2021 this workflow provides the number of paragraphs Link to comment Share on other sites More sharing options...
luckman212 Posted May 5, 2021 Author Share Posted May 5, 2021 @giovanni Thanks but that's not the same. Having it display in the clipboard viewer gives you the ability to quickly flip through history items and see the count, vs having to place items in the clipboard first and then run a workflow. Link to comment Share on other sites More sharing options...
Vero Posted May 5, 2021 Share Posted May 5, 2021 @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 More sharing options...
luckman212 Posted May 5, 2021 Author Share Posted May 5, 2021 @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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now