rabite0 / hunter

The fastest file manager in the galaxy!
Do What The F*ck You Want To Public License
1.32k stars 64 forks source link

Add batch_cmd option #40

Closed alexherbo2 closed 5 years ago

alexherbo2 commented 5 years ago

How about adding a batch_cmd option to batch rename / delete – and more generally, for batch processing – a set of selections?

Example – Batch processing with Batch:

~/.config/hunter/config

batch_cmd=batch
rabite0 commented 5 years ago

You can select multiple files call "batch $s" right now. Is there something missing?

rabite0 commented 5 years ago

You can do this with the normal command runner (type "!"). It just runs whatever you type in a $SHELL. Either run

for file in s; do cat $file; done

or use xargs:

echo $s | xargs cat

You could even write a script if you do this often and want do type less. If you append "!" to the command it will also run in the foreground, so you can run your batch command with this, too.