From e7764f9b08072cfb67c2d3ecf075df9a80aee6fd Mon Sep 17 00:00:00 2001 From: Deposite Pirate Date: Sun, 12 Jan 2025 14:40:33 +0100 Subject: Import config. --- functions/chext.fish | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 functions/chext.fish (limited to 'functions/chext.fish') diff --git a/functions/chext.fish b/functions/chext.fish new file mode 100644 index 0000000..5f8132f --- /dev/null +++ b/functions/chext.fish @@ -0,0 +1,12 @@ +function chext --description 'Change extension of files with an extension' -a sourceext -a targetext + +if test (count $argv) -lt 2 + echo 'Missing argument.' + return 1 +end + +for file in *.$sourceext + echo mv $file (path change-extension $targetext $file) +end + +end -- cgit v1.3.1