logoalt Hacker News

kevindammlast Sunday at 1:09 PM1 replyview on HN

If you get into this position what you can do is `ls <tab-completed-path>` or other command to put the filename in the previous command's argument, then you can access it via !$ or !^ (or use !!:1 or your shell's notation for indexing an argument that was already in the previous command).

It's not a fix but it'll save a little time sometimes.


Replies

minhmlast Sunday at 4:27 PM

An alternative way would be pressing M-. (assuming one is using Readline for typing text in the shell, which is the default for my bash shell).