Menu

#72 Added ability to suppress history substitution. Also fixed a related bug with use of freed memory for the prompt string and duplicate processing of the program name string.

Unstable (example)
open
nobody
None
5
2019-12-05
2019-04-25
Jim Monte
No

A new boolean variable no_histsubst was defined to suppress history substitution. Also, the handling of the prompt string was fixed if the prompt variable is deleted.

1 Attachments

Discussion

  • Jim Monte

    Jim Monte - 2019-04-28

    See patch #79 for a missing variable required for suppressing history substitution.

     
  • Jim Monte

    Jim Monte - 2019-12-05

    The patch, along with more efficient checking for "option variables" (variables that are used to set cp-* variables, such as noglob setting cp_noglob) and a potential access violation if the prompt was improperly set is available in branch beta_jdm . When updating from pre-master, there was a merge conflict that was also fixed along with some minor cleanup.

    commit 0ad9565ba782695b037c58adfe9d9e4f0db3ed17
    Merge: aee1304 dd05e24
    Date: Thu Dec 5 16:19:21 2019 -0500

    Fixed merge conflict. Also made readifile() static and removed an unnecessary string duplication there.
    

    commit aee1304ad4ab179d95eabbf8c29f2458702740ac
    Date: Thu Dec 5 14:38:57 2019 -0500

    Added no_histsubst option and related fixes
    

    Below is some testing

    ngspice 1 -> echo a b c
    a b c
    ngspice 2 -> !!:s/a/z/
    echo z b c
    z b c
    ngspice 3 -> set no_histsubst
    ngspice 4 -> echo a b c
    a b c
    ngspice 5 -> !!:s/a/z/
    !!:s/a/z/: no such command available in ngspice
    ngspice 6 -> unset no_histsubst
    ngspice 7 -> echo a b c
    a b c
    ngspice 8 -> !!:s/a/z/
    echo z b c
    z b c
    ngspice 9 -> set a < 'D:\tmp.txt'
    ngspice 10 -> echo $a
    11 12 13 14 15 16
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.