From 0e9ddbb0bf0cd34500155ea4b03de2e2a38d8ab2 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 16 Mar 2020 23:33:42 +0100 Subject: Well I'm using Arch again --- .oh-my-zsh/plugins/torrent/torrent.plugin.zsh | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .oh-my-zsh/plugins/torrent/torrent.plugin.zsh (limited to '.oh-my-zsh/plugins/torrent') diff --git a/.oh-my-zsh/plugins/torrent/torrent.plugin.zsh b/.oh-my-zsh/plugins/torrent/torrent.plugin.zsh deleted file mode 100644 index 656e337..0000000 --- a/.oh-my-zsh/plugins/torrent/torrent.plugin.zsh +++ /dev/null @@ -1,17 +0,0 @@ -# -# Algorithm borrowed from http://wiki.rtorrent.org/MagnetUri and adapted to work with zsh. -# - -function magnet_to_torrent() { - [[ "$1" =~ xt=urn:btih:([^\&/]+) ]] || return 1 - - hashh=${match[1]} - - if [[ "$1" =~ dn=([^\&/]+) ]];then - filename=${match[1]} - else - filename=$hashh - fi - - echo "d10:magnet-uri${#1}:${1}e" > "$filename.torrent" -} \ No newline at end of file -- cgit v1.2.3