prompt
This function changes the prompt to be displayed in interactive mode and memorizes it so it will be used whenever B4P is started. The prompt can be enriched with useful data such as current date and time, current working directory, etc. Advice: Use this function in interactive mode. Not recommended to specify it inmidst a B4P program.
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
Opt. 1 input |
string | B4P expression Specify a B4P expression (as a string, not code piece like in other functions) which will be saved and applied whenever interactive mode is invoked. |
Type | Description |
---|---|
string | Currently defined prompt The prompt as shown in interactive mode will be returned |
>> prompt( "working directory()+ ' >>'" )
C:\Users\Zur Bonsen Georg\Documents\Programme\Beyond4P\B4P_Docu_Maker >> echo (Hello)
Hello
C:\Users\Zur Bonsen Georg\Documents\Programme\Beyond4P\B4P_Docu_Maker >> prompt( "str(date time( now )) + '>'" )
2020-10-01 20:15:29>
2020-10-01 20:15:31> prompt( "right last match( working directory(), "\") + ' >>'" )
B4P_Docu_Maker >> $ cd ..
B4P: Verify and resolve path '..' ...
OK. Current directory changed to 'C:\Users\Zur Bonsen Georg\Documents\Programme\Beyond4P\'
Beyond4P >> $ cd *Maker
B4P: Verify and resolve path '*Maker' ...
OK. Current directory changed to 'C:\Users\Zur Bonsen Georg\Documents\Programme\Beyond4P\B4P_Docu_Maker\'
B4P_Docu_Maker >> prompt ("")
>> =prompt()
>> ["string"]
>>