]> Sergey Matveev's repositories - dotfiles.git/blobdiff - mpv/bin/mp
Perl->zsh, anyway I use it
[dotfiles.git] / mpv / bin / mp
index 9f03422282976bb2beb7abd63bafe878c64c22d5..bdefc0a78b1e18cb536dc8e521b0a4bb9f4a6df3 100755 (executable)
@@ -1,3 +1,8 @@
-#!/usr/bin/env perl
+#!/usr/bin/env zsh
 
-exec "mpv", map { s/^([A-Z][A-Z])$/--profile=$1/ ; $_ } @ARGV;
+args=()
+for arg ($@) {
+    [[ $arg =~ "^[A-Z][A-Z]$" ]] && arg="--profile=$arg"
+    args=($args $arg)
+}
+exec mpv $args