aboutsummaryrefslogtreecommitdiff
path: root/t/test.sh
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2020-11-14 20:33:34 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2020-11-14 20:33:34 +0100
commit4ba33ceb73b2c8f4cc747c32786eaa9680384d53 (patch)
treeca958b974a7c6090e44f5d1dd3c8f5c095ef3ce7 /t/test.sh
parentc074c0d51a6e3c7924a2ddea3ea418729564a252 (diff)
downloadg-4ba33ceb73b2c8f4cc747c32786eaa9680384d53.tar.gz
g-4ba33ceb73b2c8f4cc747c32786eaa9680384d53.zip
Added some compatibilities with zsh
The work is half-done, but I also needed some of the other fixes entangled in this whole mess of a commit. Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 't/test.sh')
-rw-r--r--t/test.sh28
1 files changed, 14 insertions, 14 deletions
diff --git a/t/test.sh b/t/test.sh
index f5405b7..bc2d06d 100644
--- a/t/test.sh
+++ b/t/test.sh
@@ -9,10 +9,10 @@ cd /
mkdir -p a/b/c
mkdir -p a/d
-g -v &>> /output.txt
-g --version &>> /output.txt
-g -h &>> /output.txt
-g --help &>> /output.txt
+g -v >> /output.txt 2>&1
+g --version >> /output.txt 2>&1
+g -h >> /output.txt 2>&1
+g --help >> /output.txt 2>&1
# Let's add some shortcuts.
g add root
@@ -21,8 +21,8 @@ g add c a/b/c
# Errors on the `add` command.
set +e
-g add add &>> /output.txt
-g add lala lala lala &>> /output.txt
+g add add >> /output.txt 2>&1
+g add lala lala lala >> /output.txt 2>&1
set -e
# Removing shortcuts.
@@ -31,26 +31,26 @@ g rm d
# Errors on the `rm` command.
set +e
-g rm &>> /output.txt
-g rm lala lala &>> /output.txt
+g rm >> /output.txt 2>&1
+g rm lala lala >> /output.txt 2>&1
set -e
# The list command.
-g list --keys | xargs -n1 | sort | xargs &>> /output.txt
-g list | awk '{ print $1 }' | sort | xargs &>> /output.txt
+g list --keys | xargs -n1 | sort | xargs >> /output.txt 2>&1
+g list | awk '{ print $1 }' | sort | xargs >> /output.txt 2>&1
# Bare g command.
cd /
g b
-basename $(pwd) &>> /output.txt
+basename $(pwd) >> /output.txt 2>&1
g root
-basename $(pwd) &>> /output.txt
+basename $(pwd) >> /output.txt 2>&1
g root/a/b/c
-basename $(pwd) &>> /output.txt
+basename $(pwd) >> /output.txt 2>&1
# Unknown shortcut.
set +e
-g unknown &>> /output.txt
+g unknown >> /output.txt 2>&1
set -e
# Final diff