Skip to content
Snippets Groups Projects
  • Wolfgang Denk's avatar
    7d85591d
    env: fix "env ask" command · 7d85591d
    Wolfgang Denk authored
    
    The "env ask" traditionally uses a somewhat awkward syntax:
    
    	env ask name [message ...] [size]
    
    So far, when a mesage was given, you always also had to enter a size.
    If you forgot to do that, the command would terminate without any
    indication of the problem.
    
    To avoid incompatible changes of the interface, we now check the last
    argument if it can be converted into a decimal number.  If this is the
    case, we assume it is a size; otherwise we treat it as part of the
    message.
    
    Also, add a space after the message fore easier reading,
    and clean up help mesage.
    
    Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
    7d85591d
    History
    env: fix "env ask" command
    Wolfgang Denk authored
    
    The "env ask" traditionally uses a somewhat awkward syntax:
    
    	env ask name [message ...] [size]
    
    So far, when a mesage was given, you always also had to enter a size.
    If you forgot to do that, the command would terminate without any
    indication of the problem.
    
    To avoid incompatible changes of the interface, we now check the last
    argument if it can be converted into a decimal number.  If this is the
    case, we assume it is a size; otherwise we treat it as part of the
    message.
    
    Also, add a space after the message fore easier reading,
    and clean up help mesage.
    
    Signed-off-by: default avatarWolfgang Denk <wd@denx.de>