Jump to content

jafergus

Member
  • Posts

    0
  • Joined

  • Last visited

jafergus's Achievements

Helping Hand

Helping Hand (3/5)

1

Reputation

  1. I have zsh configured with 1000's of lines of stored command history and the capability for partial history searching. That way if I begin a command I've previously used and press Up I can go through my history in reverse order of just commands with that prefix. So if I've previously typed `cd /etc/` then typed some other commands not beginning with `cd` and then later type `cd ` and key up then it jumps to the line in history beginning with `cd` which is `cd /etc/`. In practice this is very useful when you know you fairly recently used a command with long params and you want to jump to it to use the same params. It's also very useful with commands that have a limited number of possible params because once you have an established history you can just type the command and scroll through all the possible params (note, history is most useful here if it is reduced to unique commands, not keying through 20 instances of using the same one or two params to find the time you used a third variation). For an example use case, I'm a developer, our company has 10-20 repos/projects we're working on. There are a range of workflows and custom urls we might want to setup that might take one of these repos as a param (open GH page for the repo, open CI for the repo etc). Rather than create a separate workflow keyword or custom url for, say, 8 commands times 20 projects, 160 keywords, or laboriously typing the same repo param in full each time, this feature would allow me to just setup the 8 commands and start using them and (once I've built up the history) then I can usually complete a command by typing its name and keying up a few times. Because commands are stored in historical order keying up will also usually hit the most commonly used projects first (or you could explicitly design it to show partial history matches in order of frequency of use in the history).
×
×
  • Create New...