https://magicant.github.io/yash/ This README is also available in 日本語.
Yash, yet another shell, is a POSIX-compliant command line shell written in C99 (ISO/IEC 9899:1999). Yash is intended to be the most POSIX-compliant shell in the world while supporting features for daily interactive and scripting use. Notable features are:
Yash can be modified/redistributed under the terms of the GNU General Public License (Version 2) but the use of this program is without any warranty. See the COPYING file for the full text of GPL.
Yash is maintained on GitHub, but was formerly on OSDN.
Yash now fully supports POSIX.1-2008 (IEEE Std 1003.1, 2016 Edition) except for the limitations listed below.
Yash is stable. A maintenance update is released every three months or so. For the change history, see the NEWS file.
Yash is supposed to build and run on any POSIX.1-2001 environment with the Software Development Utilities and the C-Language Development Utilities options.
Currently, yash is mainly tested on Fedora, macOS, and Cygwin.
See the INSTALL file to see how to build and install yash.
After installation, the manual can be viewed by
$ man yash
The manual is also available online at https://magicant.github.io/yash/doc/.
Below is a description of basic configuration that you might want to see after installation to get started with yash. For configuration details, see the manual.
When yash is started as a login shell, it reads $XDG_CONFIG_HOME/yash/profile
or ~/.yash_profile
as a fallback. This file is a shell script in which you
define environment variables using the export command.
When yash is started for an interactive use, it reads $XDG_CONFIG_HOME/yash/rc
or ~/.yashrc
(after reading $XDG_CONFIG_HOME/yash/profile
if it is a login
shell also). In this file, you make other configurations such as aliases,
prompt strings, key bindings for command line editing, and command-not-found
handler. Use the share/initialization/sample
file as a template for your $XDG_CONFIG_HOME/yash/rc
.
In many Unix-like OSes, a shell must be listed in /etc/shells
to be
set as a login shell. Edit this file and ensure that the path to yash
is written in the file.
Then, run the chsh
command in the terminal and follow instructions
from the command. Depending on your system, you may have to use
another command to change the login shell. See documentation on your
system.
__attribute__
is used in the source
code. When not compiled with GCC or Clang, this keyword is removed
by the preprocessor, so generally there is no harm. But if your
compiler uses this keyword for any other purpose, compilation may
fail. Additionally, some other identifiers starting with _
may
cause compilation errors on some rare environments.0400=user read 0200=user write 0100=user execute
0040=group read 0020=group write 0010=group execute
0004=other read 0002=other write 0001=other execute
-o nolog
option is not supported: it is silently ignored.PS1
is subject to
parameter expansion. Yash performs command substitution and
arithmetic expansion as well on the PS1
value.printf %c foo
should print the
first byte of string foo
. Yash prints the first character of
foo
, which may be more than one byte.return
built-in, if executed in a trap, can operate only on a
function, script, or loop that has been executed within the trap.
This limitation is not strictly POSIX-compliant, but needed for
consistent and predictable behavior of the shell.$LINENO
) may not be counted correctly in and after a
complex expansion containing a line continuation.HAVE_WCSNRTOMBS
macro in the config.h
header file.Comments, suggestions, and bug reports are welcome at:
If you are interested in translation, please refer to TRANSLATING.md.
Watanabe, Yuki magicant@wonderwand.net