From cbad3d16fb358fb6042a0e91a21b15eeb90bb95c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 31 Aug 2016 17:49:42 +1200 Subject: Add very basic Yash support I know almost nothing about Yash yet, but reading the manual page on its startup behaviour implies a little coaxing is necessary to make it play nicely with my file layout. --- Makefile | 16 +++++++++++++++- README.markdown | 2 ++ check/yash | 6 ++++++ lint/yash | 2 ++ yash/yash_profile | 2 ++ yash/yashrc | 3 +++ 6 files changed, 30 insertions(+), 1 deletion(-) create mode 100755 check/yash create mode 100755 lint/yash create mode 100644 yash/yash_profile create mode 100644 yash/yashrc diff --git a/Makefile b/Makefile index a311ee1d..b06a8344 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,7 @@ install-vim-pathogen \ install-wyrd \ install-x \ + install-yash \ install-zsh \ check \ check-bash \ @@ -48,11 +49,13 @@ check-pdksh \ check-sh \ check-urxvt \ + check-yash \ lint \ lint-bash \ lint-bin \ lint-games \ lint-pdksh \ + lint-yash \ lint-sh \ lint-urxvt @@ -348,6 +351,10 @@ install-x : install -pm 0644 -- X/Xresources "$(HOME)"/.Xresources install -pm 0644 -- X/Xresources.d/* "$(HOME)"/.Xresources.d +install-yash : check-yash install-sh + install -pm 0644 -- yash/yashrc "$(HOME)"/.yashrc + install -pm 0644 -- yash/yash_profile "$(HOME)"/.yash_profile + install-zsh : install-sh install -pm 0644 -- zsh/zprofile "$(HOME)"/.zprofile install -pm 0644 -- zsh/zshrc "$(HOME)"/.zshrc @@ -380,13 +387,17 @@ check-sh : check-urxvt : check/urxvt +check-yash : + check/yash + lint : check \ lint-bash \ lint-bin \ lint-games \ lint-pdksh \ lint-sh \ - lint-urxvt + lint-urxvt \ + lint-yash lint-bash : lint/bash @@ -405,3 +416,6 @@ lint-sh : lint-urxvt : lint/urxvt + +lint-yash : + lint/yash diff --git a/README.markdown b/README.markdown index 99883c97..9e17fc8d 100644 --- a/README.markdown +++ b/README.markdown @@ -79,6 +79,8 @@ Configuration is included for: frontend for [Remind](https://www.roaringpenguin.com/products/remind) * [X11](https://www.x.org/wiki/) -- Windowing system with network transparency for Unix +* [Yash](https://yash.osdn.jp/index.html.en) -- Yet another shell; just + enough configuration to make it read the portable POSIX stuff * [Zsh](https://www.zsh.org/) -- Bourne-style shell designed for interactive use diff --git a/check/yash b/check/yash new file mode 100755 index 00000000..fb737596 --- /dev/null +++ b/check/yash @@ -0,0 +1,6 @@ +#!/bin/sh +for yash in yash/* ; do + [ -f "$yash" ] || continue + yash -n "$yash" || exit +done +printf 'All yash scripts parsed successfully.\n' diff --git a/lint/yash b/lint/yash new file mode 100755 index 00000000..c2eacab3 --- /dev/null +++ b/lint/yash @@ -0,0 +1,2 @@ +#!/bin/sh +find yash -type f -print -exec shellcheck -e SC1090 -s sh -- {} \; diff --git a/yash/yash_profile b/yash/yash_profile new file mode 100644 index 00000000..d37f35a1 --- /dev/null +++ b/yash/yash_profile @@ -0,0 +1,2 @@ +# Load ~/.profile, because Yash won't by itself, no matter how you invoke it +[ -e "$HOME"/.profile ] && . "$HOME"/.profile diff --git a/yash/yashrc b/yash/yashrc new file mode 100644 index 00000000..eef82e54 --- /dev/null +++ b/yash/yashrc @@ -0,0 +1,3 @@ +# Load POSIX interactive shell startup files, because Yash won't do it if not +# invoked as sh(1) +[ -e "$ENV" ] && . "$ENV" -- cgit v1.2.3