Force users to write (bash ...) when they want it
This commit is contained in:
parent
8633236dfa
commit
c3c3e9e9b5
|
@ -63,6 +63,7 @@ module Mini_shexp = struct
|
||||||
; cstr "copy-and-add-line-directive" (p @> p @> nil) (fun src dst ->
|
; cstr "copy-and-add-line-directive" (p @> p @> nil) (fun src dst ->
|
||||||
Copy_and_add_line_directive (src, dst))
|
Copy_and_add_line_directive (src, dst))
|
||||||
; cstr "system" (a @> nil) (fun cmd -> System cmd)
|
; cstr "system" (a @> nil) (fun cmd -> System cmd)
|
||||||
|
; cstr "bash" (a @> nil) (fun cmd -> Bash cmd)
|
||||||
]
|
]
|
||||||
sexp
|
sexp
|
||||||
|
|
||||||
|
@ -108,14 +109,9 @@ module Mini_shexp = struct
|
||||||
|
|
||||||
module Unexpanded = struct
|
module Unexpanded = struct
|
||||||
type t = (String_with_vars.t, String_with_vars.t) Ast.t
|
type t = (String_with_vars.t, String_with_vars.t) Ast.t
|
||||||
|
let t = Ast.t String_with_vars.t String_with_vars.t sexp
|
||||||
let sexp_of_t = Ast.sexp_of_t String_with_vars.sexp_of_t String_with_vars.sexp_of_t
|
let sexp_of_t = Ast.sexp_of_t String_with_vars.sexp_of_t String_with_vars.sexp_of_t
|
||||||
|
|
||||||
let t sexp =
|
|
||||||
match sexp with
|
|
||||||
| Atom _ -> Bash (String_with_vars.t sexp)
|
|
||||||
| List _ -> Ast.t String_with_vars.t String_with_vars.t sexp
|
|
||||||
|
|
||||||
let fold_vars t ~init ~f =
|
let fold_vars t ~init ~f =
|
||||||
Ast.fold t ~init ~f:(fun acc pat ->
|
Ast.fold t ~init ~f:(fun acc pat ->
|
||||||
String_with_vars.fold ~init:acc pat ~f)
|
String_with_vars.fold ~init:acc pat ~f)
|
||||||
|
|
Loading…
Reference in New Issue