-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
builtin_history outputs history, along with a -c option. Sh_nolog implemented. Added a simple test, but it's of course non-POSIX because `history` is an unspecified command. More or less mimicked bash/yash.
- Loading branch information
Showing
6 changed files
with
127 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ok |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
cat > scr <<EOF | ||
history | grep history >/dev/null || exit 1 | ||
echo hi >/dev/null | ||
history | grep echo >/dev/null || exit 2 | ||
history -c | ||
history >hist | ||
grep echo >/dev/null hist && exit 3 | ||
set -o nolog | ||
history -c | ||
echo hello >/dev/null | ||
history >hist2 | ||
grep echo >/dev/null hist2 && exit 4 | ||
echo ok | ||
EOF | ||
$TEST_SHELL -i scr 2>/dev/null |