Commit c817bfcc authored by Justin Hileman's avatar Justin Hileman

Fix "missing argument" error when calling tab without args

parent dcb43ef0
...@@ -12,13 +12,15 @@ function tab -d 'Open the current directory (or any other directory) in a new ta ...@@ -12,13 +12,15 @@ 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
if test -d $argv[1]
pushd . >/dev/null pushd . >/dev/null
cd $argv[1] cd $argv[1]
set cdto $PWD set cdto $PWD
set -e argv[1] set -e argv[1]
popd >/dev/null popd >/dev/null
end end
end
if test (count $argv) -gt 0 if test (count $argv) -gt 0
set cmd "; $argv" set cmd "; $argv"
......
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