Re: Proposed Prompt Escapes

2015-11-18 Thread isabella parakiss
On 11/19/15, Ángel González wrote: > Dennis Williamson wrote: >> Do you mean something like: >> >> PS1='$SECONDS ' > > Not exactly. $SECONDS is the number of seconds since the shell was > started. I am interested in the seconds elapsed by the last command. > > It is a hacky solution, but it could

Re: Proposed Prompt Escapes

2015-11-18 Thread Ángel González
Dennis Williamson wrote: > Do you mean something like: > > PS1='$SECONDS ' Not exactly. $SECONDS is the number of seconds since the shell was started. I am interested in the seconds elapsed by the last command. It is a hacky solution, but it could be done with: > PS1=''; PROMPT_COMMAND='printf "

Re: Proposed Prompt Escapes

2015-11-17 Thread Dennis Williamson
On Tue, Nov 17, 2015 at 4:16 PM, Ángel González wrote: > While we are talking about new prompt escapes, I would love to be able > to put in the prompt escapes elapsed time values from the previous > command, so prefixing with time(1) could be redundant (if the intended > resource was provided as

Re: Proposed Prompt Escapes

2015-11-17 Thread Ángel González
While we are talking about new prompt escapes, I would love to be able to put in the prompt escapes elapsed time values from the previous command, so prefixing with time(1) could be redundant (if the intended resource was provided as an escape). Regards

Re: Proposed Prompt Escapes

2015-11-10 Thread Dennis Williamson
On Tue, Nov 10, 2015 at 12:14 PM, Andreas Schwab wrote: > Dennis Williamson writes: > > > But wait, you don't need the intermediate step! It already works!!! > > > > prompt=$'\u, something about dominoes \U1F061 \@ ' > > You should quote the backslashes. > > prompt=$'\\u, something about domino

Re: Proposed Prompt Escapes

2015-11-10 Thread Andreas Schwab
Dennis Williamson writes: > But wait, you don't need the intermediate step! It already works!!! > > prompt=$'\u, something about dominoes \U1F061 \@ ' You should quote the backslashes. prompt=$'\\u, something about dominoes \U1F061 \\@ ' Andreas. -- Andreas Schwab, sch...@linux-m68k.org GP

Re: Proposed Prompt Escapes

2015-11-10 Thread Dennis Williamson
On Mon, Nov 9, 2015 at 5:09 PM, Dennis Williamson < dennistwilliam...@gmail.com> wrote: > > > On Thu, Nov 5, 2015 at 6:26 PM, Dennis Williamson < > dennistwilliam...@gmail.com> wrote: > >> It might be handy to have some of the escapes that work in $'string' >> quoting to also work in prompts espec

Re: Proposed Prompt Escapes

2015-11-09 Thread Dennis Williamson
On Thu, Nov 5, 2015 at 6:26 PM, Dennis Williamson < dennistwilliam...@gmail.com> wrote: > It might be handy to have some of the escapes that work in $'string' > quoting to also work in prompts especially now with the ${parameter@P} > transformation. > > Specifically the hex, unicode and control on

Proposed Prompt Escapes

2015-11-05 Thread Dennis Williamson
It might be handy to have some of the escapes that work in $'string' quoting to also work in prompts especially now with the ${parameter@P} transformation. Specifically the hex, unicode and control ones: \xHH, \u, \U and \cx. I presume that the dollar-single-quote escapes should not b