Skip to content

Commit

Permalink
fix for #25, cisco/hp/pb login failure on hp procurve because of (unu…
Browse files Browse the repository at this point in the history
…sed) prompt basic
  • Loading branch information
Alexander Zangerl committed Oct 4, 2017
1 parent fc1e09b commit 2737bb8
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/Net/CLI/Interact/phrasebook/cisco/hp/pb
@@ -1,8 +1,15 @@
# phrasebook for hp devices with cli, e.g. hp procurve

# hp cli: outputs ansi escapes, before and after the prompt...apparently not possible to disable?
# privileged and configure prompt cannot be inherited from cisco pb for that reason
prompt generic
match /[\/a-zA-Z0-9._:-]+ ?(?:\(config[^)]*\))? ?[#>] ?$/
match /[\/a-zA-Z0-9._:-]+ ?(?:\(config[^)]*\))? ?[#>] ?(?:\x1b\[[0-9;\?]*[A-KSTfhilmnrs])*$/

prompt privileged
match /# ?(?:\x1b\[[0-9;\?]*[A-KSTfhilmnrs])*$/

prompt basic
match /: ?$/
prompt configure
match /\(config[^)]*\)# ?(?:\x1b\[[0-9;\?]*[A-KSTfhilmnrs])*$/

prompt user
match /login as: ?$/
Expand All @@ -13,6 +20,3 @@ macro enable_paging
macro disable_paging
send no page

# legacy support
prompt prompt
match /[\/a-zA-Z0-9._:-]+ ?(?:\(config[^)]*\))? ?[#>] ?$/

0 comments on commit 2737bb8

Please sign in to comment.