Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell escape with ! prevents symbol names containing it. [fixed, waiting for some cleanup] #85

Open
anwyn opened this issue Jan 28, 2025 · 1 comment
Labels
bug:terminal-repl This happens only in the readline REPL, not in Slime

Comments

@anwyn
Copy link

anwyn commented Jan 28, 2025

This is an issue I came upon on trying to load folio2 via quicklisp from ciel-user.
Folio2 follows the convention of marking destructive functions with an exclamation mark. Compiling failed at the first such function, namely set-box!. Disabling the syntax with (disable-shell-passthrough) did not really help, it appears \! can still not be part of a symbol name.

Code to demonstrate this:

ciel-user> (defun set-box! ())          
/bin/sh: -c: line 1: syntax error near unexpected token `)'
/bin/sh: -c: line 1: ` ())'       
Parser error: Subprocess with command " ())"
 exited with error code 2
                                                                                     
ciel-user> (disable-shell-passthrough )
=> T
                                          
ciel-user> (defun set-box! ())    
; in: DEFUN SET-BOX                       
;     (SB-INT:NAMED-LAMBDA CIEL-USER::SET-BOX                                 
;         CIEL-USER::!          
;       (BLOCK CIEL-USER::SET-BOX NIL))
; 
; caught ERROR:
;   The lambda expression has a missing or non-list lambda list:
;     (LAMBDA ! (BLOCK SET-BOX NIL))
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition
;   caught 1 ERROR condition
Evaluation error: The lambda expression has a missing or non-list lambda list:
  (LAMBDA ! (BLOCK SET-BOX NIL))
=> NIL

ciel-user> (defpackage test (:use :cl))
=> #<PACKAGE "TEST">

ciel-user> (in-package test)
=> #<PACKAGE "TEST">

TEST> (defun set-box! ())
; in: DEFUN SET-BOX
;     (SB-INT:NAMED-LAMBDA TEST::SET-BOX
;         TEST::!
;       (BLOCK TEST::SET-BOX NIL))
; 
; caught ERROR:
;   The lambda expression has a missing or non-list lambda list:
;     (LAMBDA ! (BLOCK SET-BOX NIL))
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition
;   caught 1 ERROR condition
Evaluation error: The lambda expression has a missing or non-list lambda list:
  (LAMBDA ! (BLOCK SET-BOX NIL))
=> NIL

TEST> 
@vindarel
Copy link
Contributor

thank you for the report. I noticed another issue but not that it was that bad.

You can fix it for your current session with

(named-readtables:in-readtable nil)

but I'm disabling Clesh usage in the next commit.

vindarel added a commit that referenced this issue Jan 29, 2025
I'll disable Clesh altogether,
and add a simpler shell passtrough.

for #85
@vindarel vindarel changed the title Shell escape with ! prevents symbol names containing it. Shell escape with ! prevents symbol names containing it. [fixed, waiting for some cleanup] Jan 29, 2025
@vindarel vindarel added the bug:terminal-repl This happens only in the readline REPL, not in Slime label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:terminal-repl This happens only in the readline REPL, not in Slime
Projects
None yet
Development

No branches or pull requests

2 participants