bugGNU GRUB - Bugs: bug #33460, please shift menuentry params

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #33460: please shift menuentry params

Submitted by:  Ximin Luo <infinity0>
Submitted on:  Thu 02 Jun 2011 09:11:25 AM UTC  
 
Category: User InterfaceSeverity: Major
Priority: 5 - NormalItem Group: Action Request
Status: Wont FixPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 
Release: otherReproducibility: Every Time
Planned Release: None

Thu 02 Jun 2011 01:44:07 PM UTC, comment #3:

Changing interface just for the sake of it is never good

Vladimir Serbinenko <phcoder>
Project Administrator
Thu 02 Jun 2011 09:50:36 AM UTC, comment #2:

to clarify, the problem is that would-be-old versions would silently perform a different behaviour.

some more suggestions for alternatives:

menuentry testentry -p arg1 arg2 arg3 { echo $1 $2 $3; sleep 1; }

(the -p causes would-be-old versions to fail with an error. could use some other option, like "---".)

menuentry testentry { echo $1 $2 $3; sleep 1; } arg1 arg2 arg3

(the syntax causes would-be-old versions to fail with an error)

Ximin Luo <infinity0>
Thu 02 Jun 2011 09:26:22 AM UTC, comment #1:

hm, just realised that changing menuentry in-place would break the behaviour for would-be-old version of grub. maybe this could be implemented as a different command, like newmenuentry or something.

Ximin Luo <infinity0>
Thu 02 Jun 2011 09:11:25 AM UTC, original submission:

currently, dynamic menuentry is enabled as per the following syntax:

grub> menuentry testentry arg1 arg2 arg3 { echo $chosen $1 $2 $3; sleep 1; }

selecting this entry outputs:
testentry testentry arg1 arg2

Please change grub so that $1 refers to arg1, i.e. have $1 start at the first argument, rather than the entry name, since $chosen is already set to the entry name.

The entry above should then output:
testentry arg1 arg2 arg3
which is more intuitive and shell-like

This feature is currently undocumented so this request should not be a problem to "affect existing users".

One simple way of implementing it is to implicitly call shift at the start of the menuentry commands.

Ximin Luo <infinity0>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by infinity0 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Jun 2011 01:44:07 PM UTCphcoderStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1