forked from shellspec/shellspec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ksh_workaround.sh
67 lines (65 loc) · 2.68 KB
/
ksh_workaround.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#shellcheck shell=sh
ksh_workaround_loaded() {
# for ksh93 and ksh2020
# These shells do not allow functions defined outside of the subshell
# to be redefined within the subshell. a hack using aliases avoids this.
shellspec_redefinable shellspec_puts
shellspec_redefinable shellspec_putsn
shellspec_redefinable shellspec_output
shellspec_redefinable shellspec_output_failure_message
shellspec_redefinable shellspec_output_failure_message_when_negated
shellspec_redefinable shellspec_on
shellspec_redefinable shellspec_off
shellspec_redefinable shellspec_yield
shellspec_redefinable shellspec_parameters
shellspec_redefinable shellspec_profile_start
shellspec_redefinable shellspec_profile_end
shellspec_redefinable shellspec_invoke_example
shellspec_redefinable shellspec_statement_evaluation
shellspec_redefinable shellspec_statement_preposition
shellspec_redefinable shellspec_append_shell_option
shellspec_redefinable shellspec_evaluation_cleanup
shellspec_redefinable shellspec_statement_ordinal
shellspec_redefinable shellspec_statement_subject
shellspec_redefinable shellspec_subject
shellspec_redefinable shellspec_syntax_dispatch
shellspec_redefinable shellspec_set_long
shellspec_redefinable shellspec_import
shellspec_redefinable shellspec_clone
shellspec_redefinable shellspec_clone_typeset
shellspec_redefinable shellspec_clone_set
shellspec_redefinable shellspec_clone_exists_variable
shellspec_redefinable shellspec_rm
shellspec_redefinable shellspec_chmod
shellspec_redefinable shellspec_mv
shellspec_redefinable shellspec_create_mock_file
shellspec_redefinable shellspec_gen_mock_code
shellspec_redefinable shellspec_is_function
shellspec_redefinable shellspec_sleep
shellspec_redefinable shellspec_source
shellspec_redefinable shellspec_is_temporary_skip
shellspec_redefinable shellspec_is_temporary_pending
shellspec_redefinable shellspec_call_after_hooks
shellspec_redefinable shellspec_dsl_check
shellspec_redefinable shellspec_fds_check
shellspec_redefinable shellspec_readfile_once
shellspec_redefinable shellspec_head
shellspec_redefinable shellspec_od
shellspec_redefinable shellspec_hexdump
# for ksh88 and busybox-1.1.3
# These shells do not allow built-in commands cannot be redefined
# by shell functions. a hack using aliases avoids this.
shellspec_unbuiltin "ps"
shellspec_unbuiltin "last"
shellspec_unbuiltin "sleep"
shellspec_unbuiltin "date"
shellspec_unbuiltin "wget"
shellspec_unbuiltin "mkdir"
shellspec_unbuiltin "kill"
shellspec_unbuiltin "env"
shellspec_unbuiltin "cat"
shellspec_unbuiltin "od"
shellspec_unbuiltin "hexdump"
shellspec_unbuiltin "tar"
shellspec_unbuiltin "cd"
}