We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9e2061 commit 87597deCopy full SHA for 87597de
1 file changed
.zshrc
@@ -738,6 +738,19 @@ dedent() {
738
echo "Removed leading whitespace from clipboard content"
739
}
740
741
+# Extract URLs from unstructured text (stdin or args).
742
+urls() {
743
+ local input
744
+ if (( $# > 0 )); then
745
+ input="$*"
746
+ else
747
+ input="$(cat)"
748
+ fi
749
+ print -r -- "$input" | grep -oE '(https?|ftp|file)://[^[:space:]<>"'\''`]+' \
750
+ | sed -E 's/[.,;:!?)\]}>]+$//' \
751
+ | awk '!seen[$0]++'
752
+}
753
+
754
# ZSH-SPECIFIC COMPLETION {{{1
755
756
# Add new Zsh Completions repo
0 commit comments