Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print Index in History Command Output #2068

Merged
merged 13 commits into from
May 5, 2019
Merged

Conversation

daxgames
Copy link
Member

@daxgames daxgames commented Mar 31, 2019

  • Sync with current Cmder master branch
  • Sets default history_expand_mode = 3

schaazzz and others added 10 commits March 17, 2017 10:26
Currently the "history" command in Cmder prints commands without any index associated with any command, so you can copy/paste a command or use "!!" to execute a command from the history but, unlike BASH, you can't do "!<command_index>".

"cat" has a switch, "-n", which prints line numbers of the file being printed. This, in conjunction with "history_io=3" in Clink settings (to read/write history when editing a command") works just like BASH, i.e., you can use the index printed next to a command in the history to execute that command as "!<command_index>".
Currently the "history" command in Cmder prints commands without any index associated with any command, so you can copy/paste a command or use "!!" to execute a command from the history but, unlike BASH, you can't do "!<command_index>".

"cat" has a switch, "-n", which prints line numbers of the file being printed. This, in conjunction with "history_io=3" in Clink settings (to read/write history when editing a command") works just like BASH, i.e., you can use the index printed next to a command in the history to execute that command as "!<command_index>".
@daxgames daxgames closed this Mar 31, 2019
@daxgames daxgames reopened this May 5, 2019
@daxgames daxgames requested a review from Stanzilla May 5, 2019 20:42
@daxgames daxgames changed the title History cmd index sync Print Index in History Output May 5, 2019
@daxgames daxgames changed the title Print Index in History Output Print Index in History Command Output May 5, 2019
@daxgames daxgames merged commit 865e443 into master May 5, 2019
@Stanzilla Stanzilla deleted the history_cmd_index_sync branch January 6, 2020 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants