aboutsummaryrefslogtreecommitdiff
path: root/conf.d/05z.fish
diff options
context:
space:
mode:
Diffstat (limited to 'conf.d/05z.fish')
-rw-r--r--conf.d/05z.fish29
1 files changed, 29 insertions, 0 deletions
diff --git a/conf.d/05z.fish b/conf.d/05z.fish
new file mode 100644
index 0000000..1a7c516
--- /dev/null
+++ b/conf.d/05z.fish
@@ -0,0 +1,29 @@
+if status is-interactive
+
+if command -sq bsdtar
+ alias uz 'bsdtar -xf'
+ alias mz 'bsdtar -a -cf'
+
+ if not command -sq unrar
+ alias unrar 'bsdtar -xf'
+ end
+
+ if not command -sq 7za
+ alias 7za 'bsdtar -xf'
+ end
+
+end
+
+# If we have more than one CPU core, use threaded uncompression.
+if command -sq nproc
+ if test (nproc) -gt 1
+ alias_if xz xz -T 0
+ alias_if unxz unxz -T 0
+ alias_if unpigz gunzip
+ alias_if parunzip unzip
+ alias_if pbzip2 bzip2
+ alias_if bzip3 bzip3 -j (nproc)
+ end
+end
+
+end