Commit c817bfcc authored by Justin Hileman's avatar Justin Hileman

Fix "missing argument" error when calling tab without args

parent dcb43ef0
...@@ -12,12 +12,14 @@ function tab -d 'Open the current directory (or any other directory) in a new ta ...@@ -12,12 +12,14 @@ function tab -d 'Open the current directory (or any other directory) in a new ta
set -l cmd '' set -l cmd ''
set -l cdto $PWD set -l cdto $PWD
if test (count $argv) -gt 0 -a -d $argv[1] if test (count $argv) -gt 0
pushd . >/dev/null if test -d $argv[1]
cd $argv[1] pushd . >/dev/null
set cdto $PWD cd $argv[1]
set -e argv[1] set cdto $PWD
popd >/dev/null set -e argv[1]
popd >/dev/null
end
end end
if test (count $argv) -gt 0 if test (count $argv) -gt 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment