🐛 fix(fish): Fix extract() function

This commit is contained in:
punkfairie 2024-04-15 13:14:53 -07:00
parent 4aa055714d
commit 7c3c558a70
No known key found for this signature in database
GPG key ID: 284B78B49C058673

View file

@ -4,8 +4,8 @@
# Usage: extract <file>
function extract -a file
if [ -f "$file" ]
switch file
if test -f "$file"
switch $file
case "*.tar.bz2"
tar -jxvf $file
case "*.tar.gz"
@ -13,7 +13,7 @@ function extract -a file
case "*.bz2"
bunzip2 $file
case "*.dmg"
if [ "$(uname)" = Darwin ]
if test "$(uname)" = Darwin
hdiutil mount $file
end
case "*.gz"