From 179f02584f71f9dd5eee558e8dce29a91e656884 Mon Sep 17 00:00:00 2001 From: Benjamin Lupton Date: Fri, 20 Oct 2023 12:55:27 +0800 Subject: [PATCH] close #183: support dash, ksh - dorothy: - fix possible double-loading on posix shells when .profile is configured - use single-quotes when configuring dotfiles, and update find regex to support both - add `setup-util-dash` - add `setup-util-ksh` --- .github/workflows/dorothy-workflow.yml | 15 +++ README.md | 22 ++-- commands/dorothy | 136 +++++++++++++++---------- commands/setup-util-dash | 29 ++++++ commands/setup-util-ksh | 31 ++++++ config/shells.bash | 26 +++-- init.sh | 21 ++-- sources/environment.sh | 13 ++- sources/interactive.sh | 5 +- themes/demo.dash | 3 + themes/demo.ksh | 3 + themes/oz.dash | 3 + themes/oz.ksh | 3 + 13 files changed, 215 insertions(+), 95 deletions(-) create mode 100755 commands/setup-util-dash create mode 100755 commands/setup-util-ksh create mode 100644 themes/demo.dash create mode 100644 themes/demo.ksh create mode 100644 themes/oz.dash create mode 100644 themes/oz.ksh diff --git a/.github/workflows/dorothy-workflow.yml b/.github/workflows/dorothy-workflow.yml index 99402dcb5..77c4c736d 100755 --- a/.github/workflows/dorothy-workflow.yml +++ b/.github/workflows/dorothy-workflow.yml @@ -30,9 +30,12 @@ jobs: setup-util-nu setup-util-xonsh setup-util-elvish + setup-util-dash + setup-util-ksh setup-util-carapace dorothy install # nu -c 'echo $nu.loginshell-path' + echo-file -- '/home/runner/.profile' - name: 'Dorothy Login Shell: bash' shell: bash -leo pipefail {0} run: | @@ -75,6 +78,18 @@ jobs: # continue as normal command-exists dorothy echo-style --success='ok' + - name: 'Dorothy Login Shell: dash' + shell: dash -l {0} + run: | + # for some reason, dash -l does not load the init script on ci, but it works fine on macos with [setup-shell dash] + . '/home/runner/.profile' + command-exists dorothy + echo-style --success='ok' + - name: 'Dorothy Login Shell: ksh' + shell: ksh -l {0} + run: | + command-exists dorothy + echo-style --success='ok' - name: 'Trunk Format' if: github.event_name == 'push' shell: bash -leo pipefail {0} diff --git a/README.md b/README.md index 21a9fee6e..97addd741 100755 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Dorothy is a dotfile ecosystem featuring: -- seamless support for [Bash](), [Zsh](https://en.wikipedia.org/wiki/Z_shell), [Fish](), [Nu](https://www.nushell.sh), [Xonsh](https://xon.sh), [Elvish](https://elv.sh) +- seamless support for [Bash](), [Zsh](https://en.wikipedia.org/wiki/Z_shell), [Fish](), [Nu](https://www.nushell.sh), [Xonsh](https://xon.sh), [Elvish](https://elv.sh), [Dash](https://wiki.archlinux.org/title/Dash), [KSH](https://en.wikipedia.org/wiki/KornShell) - seamless support for multiple operating systems and architectures - seamless support for your favorite terminal and GUI editors - automatic configuration of your environment variables for what you have installed on your system @@ -167,7 +167,7 @@ If your shell doesn't recognize any of the Dorothy commands (you get a command n - Your shell is not running as a login shell. [Verify that your Terminal is running the shell as a login shell.](https://github.com/bevry/dorothy/blob/master/docs/dorothy/dorothy-not-loading.md) - Dorothy did not configure itself for the shell you use. Re-run the Dorothy installation process, and be sure to configure Dorothy for your shell. -- Your login shell is not one of the Dorothy supported shells ([Bash](), [Zsh](https://en.wikipedia.org/wiki/Z_shell), [Fish](), [Nu](https://www.nushell.sh), [Xonsh](https://xon.sh), [Elvish](https://elv.sh)). [Create an issue requesting support for your shell.](https://github.com/bevry/dorothy/issues) +- Your login shell is not one of the Dorothy supported shells. [Create an issue requesting support for your shell.](https://github.com/bevry/dorothy/issues) ## Overview @@ -186,31 +186,31 @@ For each shell that you configured during the Dorothy installation (can be recon 1. The shell loads Dorothy's initialization script: + - [Elvish](https://elv.sh) loads our [`init.elv`](https://github.com/bevry/dorothy/blob/master/init.elv) script - [Fish]() loads our [`init.fish`](https://github.com/bevry/dorothy/blob/master/init.fish) script - [Nu](https://www.nushell.sh) loads our [`init.nu`](https://github.com/bevry/dorothy/blob/master/init.nu) script - [Xonsh](https://xon.sh) loads our [`init.xsh`](https://github.com/bevry/dorothy/blob/master/init.xsh) script - - [Elvish](https://elv.sh) loads our [`init.elv`](https://github.com/bevry/dorothy/blob/master/init.elv) script - - POSIX shells ([Bash](), [Zsh](https://en.wikipedia.org/wiki/Z_shell), etc) load our [`init.sh`](https://github.com/bevry/dorothy/blob/master/init.sh) script + - POSIX shells ([Bash](), [Zsh](https://en.wikipedia.org/wiki/Z_shell), [Dash](https://wiki.archlinux.org/title/Dash), [KSH](https://en.wikipedia.org/wiki/KornShell), etc) load our [`init.sh`](https://github.com/bevry/dorothy/blob/master/init.sh) script 1. The initialization script will: 1. Ensure the `DOROTHY` environment variable is set to the location of the Dorothy installation. - 1. If a login shell, it loads our login script `sources/login.(sh|fish|nu|xsh|elv)`, which will: + 1. If a login shell, it loads our login script `sources/login.(bash|dash|elv|fish|ksh|nu|xsh|zsh)`, which will: 1. Apply any configuration changes necessary for that login shell - 1. Load our environment script `sources/environment.(sh|fish|nu|xsh|elv)`, which will: + 1. Load our environment script `sources/environment.(bash|dash|elv|fish|ksh|nu|xsh|zsh)`, which will: 1. Invoke `commands/setup-environment-commands` which determines and applies all necessary environment configuration changes to the shell. It loads your `user/config(.local)/environment.bash` configuration script for your own custom environment configuration that will be applied to all your login shells. - 1. If a login and interactive shell, it loads our interactive script `sources/interactive.(sh|fish|nu|xsh|elv)`, which will: + 1. If a login and interactive shell, it loads our interactive script `sources/interactive.(bash|dash|elv|fish|ksh|nu|xsh|zsh)`, which will: - 1. Load your own `user/config(.local)/interactive.(sh|fish|nu|xsh|elv)` configuration script for your own interactive login shell configuration. - - [Fish]() shell will load `interactive.fish` if it exists, otherwise it will load `interactive.sh`. + 1. Load your own `user/config(.local)/interactive.(bash|dash|elv|fish|ksh|nu|xsh|zsh)` configuration script for your own interactive login shell configuration. + - [Elvish](https://elv.sh) will only load `interactive.elv` if it exists. + - [Fish]() will load `interactive.fish` if it exists, otherwise it will load `interactive.sh`. - [Nu](https://www.nushell.sh) will only load `interactive.nu` and it must exist. - [Xonsh](https://xon.sh) will only load `interactive.xsh` if it exists. - - [Elvish](https://elv.sh) will only load `interactive.elv` if it exists. - - POSIX shells ([Bash](), [Zsh](https://en.wikipedia.org/wiki/Z_shell), etc) will load their `interactive.(bash|zsh|...etc)` file if it exists, otherwise they will load `interactive.sh` if exists. + - POSIX shells ([Bash](), [Zsh](https://en.wikipedia.org/wiki/Z_shell), [Dash](https://wiki.archlinux.org/title/Dash), [KSH](https://en.wikipedia.org/wiki/KornShell), etc) will load their `interactive.(bash|zsh|...etc)` file if it exists, otherwise they will load `interactive.sh` if exists. 1. Load any common alias and function utilities. 1. Load our theme configuration. 1. Load our ssh configuration. diff --git a/commands/dorothy b/commands/dorothy index 1687657b3..1448566ad 100755 --- a/commands/dorothy +++ b/commands/dorothy @@ -1094,16 +1094,20 @@ function dorothy() ( local item option_clean='no' option_uninstall='no' default_shells=() use_shells=() fodder='' local supported_shells=( bash + dash elvish fish + ksh nu xonsh zsh ) local supported_shells_with_labels=( bash Bash + dash Dash elvish Elvish fish Fish + ksh KSH nu Nu xonsh Xonsh zsh Zsh @@ -1143,63 +1147,65 @@ function dorothy() ( fi use_shells+=('bash v3 compat workaround') + # cleanup + if test "$option_clean" = 'yes'; then + rm_deprecated "$HOME/.profile" "$HOME/.bash_profile" "$HOME/.bashrc" "$HOME/.config/fish/config.fish" "$ZDOTDIR/.zshrc" "$ZDOTDIR/.zprofile" + fi + # bash if is-needle bash "${use_shells[@]}"; then echo-segment --h3='Configuring Bash' setup-util-bash - # cleanup - if test "$option_clean" = 'yes'; then - rm_deprecated "$HOME/.profile" "$HOME/.bash_profile" "$HOME/.bashrc" - fi - # mac and raspi ubuntu config-helper --file="$HOME/.bash_profile" -- \ - --find='source ".+?" # Dorothy' --replace="source \"$DOROTHY/init.sh\" # Dorothy" + --find='.+? # Dorothy' --replace="source \"$DOROTHY/init.sh\" # Dorothy" # vm ubuntu config-helper --file="$HOME/.bashrc" -- \ - --find='source ".+?" # Dorothy' --replace="source \"$DOROTHY/init.sh\" # Dorothy" + --find='.+? # Dorothy' --replace="source \"$DOROTHY/init.sh\" # Dorothy" echo-segment --g3='Configuring Bash' else config-helper --file="$HOME/.bash_profile" -- \ - --find='source ".+?" # Dorothy' --replace='' + --find='.+? # Dorothy' --replace='' config-helper --file="$HOME/.bashrc" -- \ - --find='source ".+?" # Dorothy' --replace='' + --find='.+? # Dorothy' --replace='' fi - # zsh - # https://zsh.sourceforge.io/Intro/intro_3.html - if is-needle zsh "${use_shells[@]}"; then - echo-segment --h3='Configuring Zsh' - setup-util-zsh - mkdir -p "$ZDOTDIR" - - # cleanup - if test "$option_clean" = 'yes'; then - rm_deprecated "$ZDOTDIR/.zshrc" "$ZDOTDIR/.zprofile" - fi + # dash + if is-needle dash "${use_shells[@]}"; then + echo-segment --h3='Configuring Dash' + setup-util-dash # configure - config-helper --file="$ZDOTDIR/.zshrc" -- \ - --find='source ".+?" # Dorothy' --replace="source \"$DOROTHY/init.sh\" # Dorothy" + config-helper --file="$HOME/.profile" -- \ + --find='.+? # Dorothy' --replace=". \"$DOROTHY/init.sh\" # Dorothy" - config-helper --file="$ZDOTDIR/.zprofile" -- \ - --find='source ".+?" # Dorothy' --replace="source \"$DOROTHY/init.sh\" # Dorothy" + echo-segment --g3='Configuring Dash' + elif ! is-needle bash "${use_shells[@]}" && ! is-needle ksh "${use_shells[@]}"; then + config-helper --file="$HOME/.profile" -- \ + --find='.+? # Dorothy' --replace='' + fi - config-helper --file="$HOME/.zshenv" -- \ - --find='ZDOTDIR=.+' --replace="ZDOTDIR=\"$ZDOTDIR\"" + # elvish + if is-needle elvish "${use_shells[@]}"; then + # https://elv.sh/ref/command.html#rc-file + # https://elv.sh/ref/runtime.html + # https://github.com/elves/elvish/issues/1726 + echo-segment --h3='Configuring Elvish' + setup-util-elvish + mkdir -p "$HOME/.config/elvish" - echo-segment --g3='Configuring Zsh' + # configure + config-helper --file="$HOME/.config/elvish/rc.elv" -- \ + --find='.+? # Dorothy' --replace="eval (cat '$DOROTHY/init.elv' | slurp) # Dorothy" + + echo-segment --h3='Configuring Elvish' else - mkdir -p "$ZDOTDIR" - config-helper --file="$ZDOTDIR/.zshrc" -- \ - --find='source ".+?" # Dorothy' --replace='' - config-helper --file="$ZDOTDIR/.zprofile" -- \ - --find='source ".+?" # Dorothy' --replace='' - config-helper --file="$HOME/.zshenv" -- \ - --find='ZDOTDIR=.+' --replace="ZDOTDIR=\"$ZDOTDIR\"" + mkdir -p "$HOME/.config/elvish" + config-helper --file="$HOME/.config/elvish/rc.elv" -- \ + --find='.+? # Dorothy' --replace='' fi # fish @@ -1208,20 +1214,30 @@ function dorothy() ( setup-util-fish mkdir -p "$HOME/.config/fish" - # cleanup - if test "$option_clean" = 'yes'; then - rm_deprecated "$HOME/.config/fish/config.fish" - fi - # configure config-helper --file="$HOME/.config/fish/config.fish" -- \ - --find='source ".+?" # Dorothy' --replace="source \"$DOROTHY/init.fish\" # Dorothy" + --find='.+? # Dorothy' --replace="source '$DOROTHY/init.fish' # Dorothy" echo-segment --g3='Configuring Zsh' else mkdir -p "$HOME/.config/fish" config-helper --file="$HOME/.config/fish/config.fish" -- \ - --find='source ".+?" # Dorothy' --replace='' + --find='.+? # Dorothy' --replace='' + fi + + # ksh + if is-needle ksh "${use_shells[@]}"; then + echo-segment --h3='Configuring KSH' + setup-util-ksh + + # configure + config-helper --file="$HOME/.profile" -- \ + --find='.+? # Dorothy' --replace=". '$DOROTHY/init.sh' # Dorothy" + + echo-segment --g3='Configuring KSH' + elif ! is-needle bash "${use_shells[@]}" && ! is-needle dash "${use_shells[@]}"; then + config-helper --file="$HOME/.profile" -- \ + --find='.+? # Dorothy' --replace='' fi # nu @@ -1231,13 +1247,13 @@ function dorothy() ( # trunk-ignore(shellcheck/SC2016) config-helper --file="$(nu -c 'echo $nu.loginshell-path')" -- \ - --find='source ".+?" # Dorothy' --replace="source \"$DOROTHY/init.nu\" # Dorothy" + --find='.+? # Dorothy' --replace="source '$DOROTHY/init.nu' # Dorothy" echo-segment --g3='Configuring Nu' elif command-exists nu; then # trunk-ignore(shellcheck/SC2016) config-helper --file="$(nu -c 'echo $nu.loginshell-path')" -- \ - --find='source ".+?" # Dorothy' --replace='' + --find='.+? # Dorothy' --replace='' fi # xonsh @@ -1258,24 +1274,32 @@ function dorothy() ( --find='.+? # Dorothy' --replace='' fi - # elvish - if is-needle elvish "${use_shells[@]}"; then - # https://elv.sh/ref/command.html#rc-file - # https://elv.sh/ref/runtime.html - # https://github.com/elves/elvish/issues/1726 - echo-segment --h3='Configuring Elvish' - setup-util-elvish - mkdir -p "$HOME/.config/elvish" + # zsh + # https://zsh.sourceforge.io/Intro/intro_3.html + if is-needle zsh "${use_shells[@]}"; then + echo-segment --h3='Configuring Zsh' + setup-util-zsh + mkdir -p "$ZDOTDIR" # configure - config-helper --file="$HOME/.config/elvish/rc.elv" -- \ - --find='.+? # Dorothy' --replace="eval (cat '$DOROTHY/init.elv' | slurp) # Dorothy" + config-helper --file="$ZDOTDIR/.zshrc" -- \ + --find='.+? # Dorothy' --replace="source '$DOROTHY/init.sh' # Dorothy" - echo-segment --h3='Configuring Elvish' + config-helper --file="$ZDOTDIR/.zprofile" -- \ + --find='.+? # Dorothy' --replace="source '$DOROTHY/init.sh' # Dorothy" + + config-helper --file="$HOME/.zshenv" -- \ + --find='ZDOTDIR=.+' --replace="ZDOTDIR='$ZDOTDIR'" + + echo-segment --g3='Configuring Zsh' else - mkdir -p "$HOME/.config/elvish" - config-helper --file="$HOME/.config/elvish/rc.elv" -- \ + mkdir -p "$ZDOTDIR" + config-helper --file="$ZDOTDIR/.zshrc" -- \ --find='.+? # Dorothy' --replace='' + config-helper --file="$ZDOTDIR/.zprofile" -- \ + --find='.+? # Dorothy' --replace='' + config-helper --file="$HOME/.zshenv" -- \ + --find='ZDOTDIR=.+' --replace="ZDOTDIR='$ZDOTDIR'" fi echo-segment --g2='Dorothy Shell Configuration' diff --git a/commands/setup-util-dash b/commands/setup-util-dash new file mode 100755 index 000000000..d7c139935 --- /dev/null +++ b/commands/setup-util-dash @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# https://repology.org/project/dash-shell/versions + +function setup_util_dash() ( + source "$DOROTHY/sources/bash.bash" + + # improve performance + if is-needle --quiet "$@" && ! is-needle --upgrade "$@" && ! is-needle --uninstall "$@" && command-exists dash; then + return 0 + fi + + # setup + local options=( + --cli='dash' + "$@" + APT='dash' # UBUNTU, not on repology but it exists + APK='dash' # ALPINE + AUR='dash' # ARCH + BREW='dash' + NIX='dash' + ) + setup-util "${options[@]}" +) + +# fire if invoked standalone +if test "$0" = "${BASH_SOURCE[0]}"; then + setup_util_dash "$@" +fi diff --git a/commands/setup-util-ksh b/commands/setup-util-ksh new file mode 100755 index 000000000..226211533 --- /dev/null +++ b/commands/setup-util-ksh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# https://repology.org/project/ksh/versions + +function setup_util_ksh() ( + source "$DOROTHY/sources/bash.bash" + + # improve performance + if is-needle --quiet "$@" && ! is-needle --upgrade "$@" && ! is-needle --uninstall "$@" && command-exists ksh; then + return 0 + fi + + # setup + local options=( + --cli='ksh' + "$@" + APT='ksh' # UBUNTU + AUR='ksh' # ARCH + BREW='ksh' + EMERGE='app-shells/ksh' # GENTOO + NIX='ksh' + RPM='ksh' # FEDORA + ZYPPER='ksh' # SUSE + ) + setup-util "${options[@]}" +) + +# fire if invoked standalone +if test "$0" = "${BASH_SOURCE[0]}"; then + setup_util_ksh "$@" +fi diff --git a/config/shells.bash b/config/shells.bash index b4ab4026a..398dd1369 100755 --- a/config/shells.bash +++ b/config/shells.bash @@ -4,16 +4,20 @@ # Used by `setup-shell` -# Our shells in order of preference +# Shells that Dorothy supports, reorder them with most preferred first USER_SHELLS=( - fish # fish shell - zsh # Z shell - bash # bourne again shell - nu # nushell - xonsh # python-powered shell - sh # bourne shell - ash # almquist shell - dash # debian almquist shell - ksh # korn shell - hush # hush, an independent implementation of a Bourne shell for BusyBox + # officially supported shells + bash # bourne again shell + dash # debian almquist shell + fish # fish shell + nu # nushell + zsh # Z shell + # officially supported shells (alpha/beta quality integrations) + elvish # elvish shell + ksh # korn shell + xonsh # python-powered shell + # unofficially supported shells + ash # almquist shell + hush # hush, an independent implementation of a Bourne shell for BusyBox + sh # the operating-system symlinks this to any POSIX compliant shell ) diff --git a/init.sh b/init.sh index 2f38791a5..7b49eb847 100755 --- a/init.sh +++ b/init.sh @@ -56,11 +56,10 @@ # - `$-` is `569XZim` via this script, then `569XZims` manually # - `[[ -o login ]]` returns `0` -# set -x # -# printf '$0 = %s\n$- = %s\n' "$0" "$-" +DOROTHY_LOAD='no' # this must be outside the below if, to ensure DOROTHY_LOAD is reset, and DOROTHY_LOADED is respected, otherwise posix shells may double load due to cross-compat between dotfiles (.profile along with whatever they support) if test -z "${DOROTHY_LOADED-}"; then - DOROTHY_LOAD='no' - if test "$0" = '-bash' -o "$0" = '-zsh'; then + # `-dash` is macos login shell, `dash` is manual `dash -l` invocation (as $- doesn't include l in dash) + if test "$0" = '-bash' -o "$0" = '-zsh' -o "$0" = '-dash' -o "$0" = 'dash'; then DOROTHY_LOAD='yes' elif test -n "${BASH_VERSION-}"; then # trunk-ignore(shellcheck/SC3044) @@ -72,15 +71,15 @@ if test -z "${DOROTHY_LOADED-}"; then if [[ -o login ]]; then DOROTHY_LOAD='yes' fi + elif test -z "$-" -a "${CI-}" = 'true'; then + DOROTHY_LOAD='yes' # dash on github ci, in which $- = empty, and $0 = /home/runner.... else - # bash v3 does not set l in $- + # bash v3 and dash do not set l in $- # zsh does, however zsh we have a definite option earlier # so this is for the alternative posix shells case $- in *l*) DOROTHY_LOAD='yes' ;; esac fi fi -# printf '$DOROTHY_LOAD = %s\n' "$DOROTHY_LOAD" -# set +x # # if your login shell is failing identification, # then make sure your terminal preferences has login shell enabled @@ -97,9 +96,13 @@ if test "${DOROTHY_LOAD-}" = 'yes'; then if test -z "${DOROTHY-}"; then # https://stackoverflow.com/a/246128 # https://stackoverflow.com/a/14728194 + # if true login shell on macos, then $0 is [-bash], [-zsh], [-dash], etc. export DOROTHY - # trunk-ignore(shellcheck/SC3028) - DOROTHY="$(cd "$(dirname "${BASH_SOURCE:-"$0"}")" && pwd)" # `cd ... pwd` ensures absolute path + if test -n "${XDG_DATA_HOME-}" -a -n "${XDG_DATA_HOME-}/dorothy"; then + DOROTHY="$XDG_DATA_HOME/dorothy" + else + DOROTHY="$HOME/.local/share/dorothy" + fi fi # init dorothy's environment for the login shell diff --git a/sources/environment.sh b/sources/environment.sh index 684539112..dd73eef88 100755 --- a/sources/environment.sh +++ b/sources/environment.sh @@ -2,16 +2,15 @@ # set the active shell as the detectected POSIX (.sh) shell # do not export -if test -n "${ZSH_VERSION-}"; then - ACTIVE_POSIX_SHELL='zsh' -elif test -n "${BASH_VERSION-}"; then +if test -n "${BASH_VERSION-}"; then ACTIVE_POSIX_SHELL='bash' +elif test -n "${ZSH_VERSION-}"; then + ACTIVE_POSIX_SHELL='zsh' +elif test "$0" = '-dash' -o "$0" = 'dash'; then + # dash does not define DASH_VERSION + ACTIVE_POSIX_SHELL='dash' elif test -n "${KSH_VERSION-}"; then ACTIVE_POSIX_SHELL='ksh' -elif test -n "${FCEDIT-}"; then - ACTIVE_POSIX_SHELL='ksh' -elif test -n "${PS3-}"; then - ACTIVE_POSIX_SHELL='unknown' else ACTIVE_POSIX_SHELL='sh' fi diff --git a/sources/interactive.sh b/sources/interactive.sh index a437495e0..bb5b2be16 100755 --- a/sources/interactive.sh +++ b/sources/interactive.sh @@ -18,7 +18,10 @@ else fi # Continue with the shell extras -. "$DOROTHY/sources/nvm.sh" +if test "$ACTIVE_POSIX_SHELL" != 'ksh'; then + # nvm.sh is not compatible with ksh + . "$DOROTHY/sources/nvm.sh" +fi . "$DOROTHY/sources/history.sh" . "$DOROTHY/sources/theme.sh" . "$DOROTHY/sources/ssh.sh" diff --git a/themes/demo.dash b/themes/demo.dash new file mode 100644 index 000000000..c9ef3840f --- /dev/null +++ b/themes/demo.dash @@ -0,0 +1,3 @@ +#!/usr/bin/env dash + +PS1="printf '%s' 'DorothyDemo> '" diff --git a/themes/demo.ksh b/themes/demo.ksh new file mode 100644 index 000000000..e3605c211 --- /dev/null +++ b/themes/demo.ksh @@ -0,0 +1,3 @@ +#!/usr/bin/env ksh + +PS1="printf '%s' 'DorothyDemo> '" diff --git a/themes/oz.dash b/themes/oz.dash new file mode 100644 index 000000000..173209b4b --- /dev/null +++ b/themes/oz.dash @@ -0,0 +1,3 @@ +#!/usr/bin/env dash + +PS1='$($DOROTHY/themes/oz dash $?)' diff --git a/themes/oz.ksh b/themes/oz.ksh new file mode 100644 index 000000000..0fccc98ca --- /dev/null +++ b/themes/oz.ksh @@ -0,0 +1,3 @@ +#!/usr/bin/env ksh + +PS1='$($DOROTHY/themes/oz ksh $?)'