You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature requests: Options to show the tab's working directory, last command ran, time the command was started, and be able to fuzzy search based on these
#344
Open
nothingnesses opened this issue
Feb 27, 2021
· 2 comments
Not sure if these should be four separate issues, but they're somewhat related to each other so I thought it might be appropriate to have them as one. The inspiration for this request is based on pueue which has the first three features, so you can look at that to have a better idea of what I mean.
I think having these in tab could make navigation even easier as it would mean the user doesn't have to remember what command a tab is running and which directory it's shell is currently on. Showing the time would make it easier to differentiate between different tabs if they're running the same commands from the same directories. The user also would no longer need to remember the name of a tab, or for that matter, give tabs names since they can just fuzzy search based on the other information related to that tab. E.g., say I have the following tabs:
Name | WD | Command | Start
> a | /home/foo/ | vi | 1614417902
b | /home/foo/ | vi | 1614418002
c | /home/foo/project/ | cargo run | 1614418102
d | /home/foo/ | | 1614418202
I could then enter either b or vi 80 to select the second tab in the fuzzy finder. Although maybe there should also be an option to format the time display to something like HH:MM:SS instead of the format of the output of date +%s. For the fourth tab, d, which hasn't ran any commands yet, the time displayed is the time the tab was created. Having time information for all the tabs essentially obviates the need to name tabs (naming things is hard), so maybe there could also be an option to hide columns. It would also be nice to have the option to rearrange the columns.
The text was updated successfully, but these errors were encountered:
Hi @nothingnesses,
I've thought about this as well. Particularly w/ WD and Command Histories, those could power some really nice fuzzy finder interfaces.
I haven't been able to find a way to access the working directory within the shell though. You can spawn a child process with an initial working directory, but it can change that directory without any visibility. I think it's common to initialize a tab in a project, and cd around within that project dir.
I think commands are a bit easier - those could be monitored in the shell histfile. Definitely agreed, this would be a really nice feature. I need to figure out if it's possible though.
I haven't been able to find a way to access the working directory within the shell though. You can spawn a child process with an initial working directory, but it can change that directory without any visibility. I think it's common to initialize a tab in a project, and cd around within that project dir.
Maybe std::env::current_dir can somehow be used to extract that? Or if not, then perhaps the $PWD environment variable or pwd shell command can somehow be leveraged instead?
I think commands are a bit easier - those could be monitored in the shell histfile.
I actually think command history would be harder to extract since not all shells record command history (as with dash which is what I use primarily and doesn't record commands by default, unless compiled to have the fc built-in command). Perhaps std::io::Stdin and std:process:Command could instead somehow be used to create a sort of man-in-the-middle that accepts and records shell input commands (or maybe just the last command since that's all we'd probably want) and afterwards passes it on the the actual shell/creates the child process to be ran.
Not sure if these should be four separate issues, but they're somewhat related to each other so I thought it might be appropriate to have them as one. The inspiration for this request is based on pueue which has the first three features, so you can look at that to have a better idea of what I mean.
I think having these in tab could make navigation even easier as it would mean the user doesn't have to remember what command a tab is running and which directory it's shell is currently on. Showing the time would make it easier to differentiate between different tabs if they're running the same commands from the same directories. The user also would no longer need to remember the name of a tab, or for that matter, give tabs names since they can just fuzzy search based on the other information related to that tab. E.g., say I have the following tabs:
I could then enter either
b
orvi 80
to select the second tab in the fuzzy finder. Although maybe there should also be an option to format the time display to something like HH:MM:SS instead of the format of the output ofdate +%s
. For the fourth tab, d, which hasn't ran any commands yet, the time displayed is the time the tab was created. Having time information for all the tabs essentially obviates the need to name tabs (naming things is hard), so maybe there could also be an option to hide columns. It would also be nice to have the option to rearrange the columns.The text was updated successfully, but these errors were encountered: