aboutsummaryrefslogtreecommitdiff
path: root/functions/chext.fish
diff options
context:
space:
mode:
authorDeposite Pirate2025-01-12 14:40:33 +0100
committerDeposite Pirate2025-01-12 14:40:33 +0100
commite7764f9b08072cfb67c2d3ecf075df9a80aee6fd (patch)
tree628d5f66e1d62f1d710bcbe472aa68b5e19522f8 /functions/chext.fish
parent62d7fa8cfa2e6de053d7c1238bd8fdcdf0cc8a7d (diff)
Import config.
Diffstat (limited to 'functions/chext.fish')
-rw-r--r--functions/chext.fish12
1 files changed, 12 insertions, 0 deletions
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