dotfiles/cli/fish/functions/clean_taobao_link.fish
2020-11-22 09:38:00 +08:00

5 lines
175 B
Fish

function clean_taobao_link -d 'keep only id parameter for taobao merchandise detail page link'
xsel -ob | sed 's/^\(.*\)?\(.*&\)\?\(id=[^&]\+\).*$/\1?\3/g' | xsel -b
end