This adds support for more complex alias handling, such as:
$ alias ls='ls -l'
Previously such an alias was not split into the command verb and the
argument correctly, instead the full alias string was handled as the
verb, which obviously fails.
This commit fixes this by expanding the alias, checking whether it has
arguments and if so, it merges the expanded alias + the old command line
together, resulting in a completely new command line.
Example (assuming the alias above has been created):
$ ls /bin
Results in a new command line: "ls -l /bin" which is then parsed and
executed.
switchboot <image path>
Switch to the updated or specified boot system. This command depends on
hardware support CONFIG_BOARDCTL_SWITCH_BOOT. `<image path>` point to a
partion or file which contain the firmware to boot.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
boot [<image path> [<header size>]]
Boot a new firmware image. This command depends on hardware support
CONFIG_BOARDCTL_BOOT_IMAGE. <image path> may point to a partion or file
which contain the firmware to boot. The optional, numeric argument
<header size> may be useful for skipping metadata information preprended
to the firmware image.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
CONFIG_FILE_STREAMS now defaults to 'n' when DEFAULT_SMALL is enabled. This
is a good change, but this source file fails to compile when file streams
are disabled.
Fix this by using dprintf.
Summary:
- I noticed that the ps command shows the wrong format due to
recent changes on sigmask length from 32bits to 64bits
- This commit fixes this issue
Impact:
- None
Testing:
- Tested with sabre-6quad:smp on qemu-7.1
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
ostest contains some logic that depends on internal implementation of signal sets and ostest must be updated to match those changes.
There is no particular impact from this PR. This PR is the result of impact from nuttx 8885.
Tested with nuttx 8885
A resulting word that is identified to be the command name word of a
simple command shall be examined to determine whether it is an unquoted,
valid alias name.
The keyword here being "a simple command", arguments are not subject to
expansion.
This adds support for string aliases into nsh. There are some nuances that
are not handled correctly yet:
- Reserved words can be overloaded, which is a clear POSIX violation
The parser is modified to detect, handle and remove quotes from the
command string. Whatever is inside the quotes is treated as a string
literal. If no matching end quote is found, the terminal prints out
and error.