Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use ALT. very frequently on bash. But some time I go one past the parameter I want . So I was looking for a way to call the next parameter from the history.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Like most Readline commands, yank-last-arg (the command bound to Alt.) can take a numeric argument. Type Alt-, then Alt. to invoke the command with an argument of -1 (- by itself defaults to -1 if it isn't followed by an actual number). A negative number reverses the direction of the search for the "last" arg.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.