🐛 fix(fish): Fix extract() function
This commit is contained in:
parent
4aa055714d
commit
7c3c558a70
1 changed files with 3 additions and 3 deletions
|
@ -4,8 +4,8 @@
|
||||||
# Usage: extract <file>
|
# Usage: extract <file>
|
||||||
|
|
||||||
function extract -a file
|
function extract -a file
|
||||||
if [ -f "$file" ]
|
if test -f "$file"
|
||||||
switch file
|
switch $file
|
||||||
case "*.tar.bz2"
|
case "*.tar.bz2"
|
||||||
tar -jxvf $file
|
tar -jxvf $file
|
||||||
case "*.tar.gz"
|
case "*.tar.gz"
|
||||||
|
@ -13,7 +13,7 @@ function extract -a file
|
||||||
case "*.bz2"
|
case "*.bz2"
|
||||||
bunzip2 $file
|
bunzip2 $file
|
||||||
case "*.dmg"
|
case "*.dmg"
|
||||||
if [ "$(uname)" = Darwin ]
|
if test "$(uname)" = Darwin
|
||||||
hdiutil mount $file
|
hdiutil mount $file
|
||||||
end
|
end
|
||||||
case "*.gz"
|
case "*.gz"
|
||||||
|
|
Loading…
Reference in a new issue