3 ms·
Shameless plug: Elvish is a shell with a filesystem navigator built in - you can see it in demo 5 on the homepage https://elv.sh https://elv.sh
by xiaq 3y ago
Shameless plug: Elvish is a shell with a filesystem navigator built in - you can see it in demo 5 on the homepage https://elv.sh https://elv.sh
- em-bee 3y agoi have been looking at elvish from time to time (ever since we met in beijing :-). but i am missing two key features: autosuggestion: type something and then suggest a command from the history that matches what i typed. non-incremental history: if the autosuggestion is not the right one, use arrow keys to search for a better one. fish has both. zsh has a module for autosuggestion. but if the suggestion is wrong then i have start search and retype what i just wrote. i want to avoid having to type twice. another feature i am looking for is renaming files in place: instead of: 'mv oldname newname;' i want something like 'rename oldname; enter;' and now allow me to edit 'oldname' into 'newname'. very often the filenames are long and i only want to change a few characters in it. having to retype the whole filepath when using mv can lead to errors.
- bandie91 3y agomy home grown response to the rename use-case: https://github.com/bAndie91/tools/blob/master/user-tools/rn https://github.com/bAndie91/tools/blob/master/user-tools/rn and https://github.com/bAndie91/tools/blob/master/user-tools/renamemanual https://github.com/bAndie91/tools/blob/master/user-tools/ren...
- em-bee 3y agoneat. that's pretty much what i had in mind, but only for a single rename. i just did a search and embarrassingly discovered imv which is part of the renameutils package which also contains qmv, a tool to batch rename lots of files by loading the list into an editor. embarrassed because qmv is my favourite tool for batch renaming, and so i have it already installed. imv is exactly what i am looking for, for the single file rename case: "The imv ("interactive move") program, is trivial but useful when you are too lazy to type (or even complete) the name of the file to rename twice. It allows a file name to be edited in the terminal using the GNU Readline library." so we can consider this problem solved. back to alternative shells: i am just spoiled by fish (no the fish isn't spoiled): autosuggestion and non-incremental search like fish are a requirement for me to consider any other shell now. btw: autosuggestion for elvish is being discussed here: https://github.com/elves/elvish/issues/322 https://github.com/elves/elvish/issues/322 and apparently it has some of that search feature too (from a comment): "type the beginning of a command and press Up and cycle through all the commands that start with the string I typed." i am going to have to try that.
- xiaq 3y agoAutosuggestion is one of those features that I never bothered to implement and have learned to live without. Maybe some day :) There's also Ctrl-R for searching through history, and unlike other shells it has a list UI (like fzf). If you've typed something and then press Ctrl-R, it gets used as the filter.
- _TwoFinger 3y ago> having to retype the whole filepath when using mv can lead to errors. If you use bash, or any readline-based command line (in emacs mode): mv long.file.name |^W^Y^Y results in mv long.file.name long.file.name | (| is the cursor). Then, you just edit the second copy of the filename. BTW, M-C-b/M-C-f will move by one whole "argument" (even if it contains escaped spaces). edit: and if your filename has spaces, replace the ^W above with M-C-b C-k