From: Matt <matt@excalamus.com>
Cc: "emacs-orgmode" <emacs-orgmode@gnu.org>
Subject: Re: ob-shell: proposal to remove "posh"
Date: Sat, 13 Jan 2024 11:43:48 +0100 [thread overview]
Message-ID: <18d026bafdb.10d3598f11341508.236836529439359427@excalamus.com> (raw)
In-Reply-To: <18cfa388d12.f0069ffe919377.6846036599039377431@excalamus.com>
---- On Thu, 11 Jan 2024 21:30:59 +0100 Matt wrote ---
> The change on August 26, 2022 should have caused a breaking error for someone using the "Policy-compliant Ordinary SHell." The prompt for "posh" in "org-babel-shell-set-prompt-commands" is valid PowerShell syntax (AFAIKT) and invalid bash/dash syntax:
>
> function prompt { "org_babel_sh_prompt> " }
>
> It's not clear to me what this would do in the "Policy-compliant Ordinary SHell."
It would cause an error.
I was able to build the "Policy-compliant Ordinary SHell" on Guix using:
#+begin_src guile
(use-modules (guix packages)
(guix download)
(guix build-system gnu)
(gnu packages autotools)
(gnu packages perl)
((guix licenses) #:prefix license:))
(define-public posh
(package
(name "posh")
(version "0.14.1")
(source (origin
(method url-fetch)
(uri (string-append
"https://salsa.debian.org/clint/posh/-/archive/debian/"
version "/posh-debian-" version ".tar.gz"))
(sha256
(base32
"070xnn996cjnc5yzp5819y36sgfikkrplhri4kx5r36h1fmp641d"))))
(native-inputs (list autoconf automake perl))
(build-system gnu-build-system)
(home-page "https://salsa.debian.org/clint/posh")
(synopsis "Policy-compliant Ordinary SHell")
(description
"Policy-compliant Ordinary SHell
posh is a stripped-down version of pdksh that aims for compliance with
Debian's policy, and few extra features.")
(license (list license:gpl2+))))
posh
#+end_src
The result is:
ahab@pequod /gnu/store/64wiqdp9lqjgsz0jg1v1sq2b3afincrb-posh-0.14.1/bin$ ./posh
$ function prompt { "org_babel_sh_prompt> " }
./posh: function: not found
This is expected because "function" is not a keyword in the "Policy-compliant Ordinary SHell." According to the man page:
#+begin_quote
name () command
Defines the function name. See Functions below. Note that redirections
specified after a function definition are performed whenever the
function is executed, not when the function definition is executed.
-- https://manpages.debian.org/bookworm/posh/posh.1.en.html
#+end_quote
So, yes, indeed, commit a35d1636 introduced a breaking change for the "Policy-compliant Ordinary SHell."
--
Matt Trzcinski
Emacs Org contributor (ob-shell)
Learn more about Org mode at https://orgmode.org
Support Org development at https://liberapay.com/org-mode
next prev parent reply other threads:[~2024-01-13 10:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 20:30 ob-shell: proposal to remove "posh" Matt
2024-01-12 10:04 ` Morgan Willcock
2024-01-12 15:49 ` Matt
2024-01-13 10:43 ` Matt [this message]
2024-01-13 18:02 ` Ihor Radchenko
2024-01-15 20:11 ` Matt
2024-01-15 21:16 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18d026bafdb.10d3598f11341508.236836529439359427@excalamus.com \
--to=matt@excalamus.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.