[HN Gopher] Antonmedv/walk: Terminal file manager
       ___________________________________________________________________
        
       Antonmedv/walk: Terminal file manager
        
       Author : rcarmo
       Score  : 94 points
       Date   : 2023-08-22 10:37 UTC (12 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | tamimio wrote:
       | Probably better to be called file browser, a file manager can
       | copy/paste (or download/upload if remote) files, this doesn't
       | seem to be there.
        
       | toppy wrote:
       | nnn [1] seems like a more advanced tool (directory management,
       | copying, renaming, packing/unpacking) and pluggable.
       | 
       | [1] https://github.com/jarun/nnn
        
         | skiman10 wrote:
         | I also like ncdu. https://dev.yorhel.nl/ncdu
        
           | LeBit wrote:
           | ncdu is focused on telling you who takes disk space. nnn is
           | more like a file manager with lots more features.
        
             | skiman10 wrote:
             | Yes, I like both.
        
       | xiaq wrote:
       | 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
        
         | em-bee wrote:
         | i 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.
        
           | _TwoFinger wrote:
           | > 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
        
           | bandie91 wrote:
           | my home grown response to the rename use-case:
           | 
           | https://github.com/bAndie91/tools/blob/master/user-tools/rn
           | 
           | and
           | 
           | https://github.com/bAndie91/tools/blob/master/user-
           | tools/ren...
        
       | kholdstayr wrote:
       | I see that it doesn't go up (..) a directory.
        
       | _joel wrote:
       | Was there something before https://midnight-commander.org/ or was
       | that the OG?
        
         | bpiche wrote:
         | Commander is the OG afaik
        
         | elpres wrote:
         | Norton Commander[0] is the original and predates Midnight
         | Commander by eight years.
         | 
         | [0] https://en.wikipedia.org/wiki/Norton_Commander
        
       | gcr wrote:
       | Neat project! Thanks for sharing!
       | 
       | "broot" also lives in this space, but is rapidly getting too
       | complex for me to memorize without consulting the help page.
        
         | bayesianbot wrote:
         | +1 for broot[1], it works so fast and can be used even to fuzzy
         | search sub-sub-directories. I'm also bit lost on the features
         | but the help is quite good and mostly I use it just to find a
         | directory and enter it, which requires only one keyboard
         | shortcut.
         | 
         | [1] https://github.com/Canop/broot
        
       | 9dev wrote:
       | This is the default behaviour of fish[1], by the way!
       | 
       | [1]: https://fishshell.com
        
         | lwhsiao wrote:
         | Can you say more? AFAIK, fish doesn't have an interactive fuzzy
         | cd built-in.
        
           | em-bee wrote:
           | it works a bit differently i think, but it does have a fuzzy
           | search. if i type "cd ae[tab]" then fish will list all
           | directories with the letters a and e in them, except when
           | there are entries that start with "ae" then it will only show
           | those. that is fuzzy search only comes when there are no
           | better matches.
        
       | jrm4 wrote:
       | Nice. I ended up using fff + a little script that pops you to
       | where you select, but I'll see if this is more elegant.
       | 
       | I don't know about y'all, but my biggest problem with these
       | things is that I'm definitely faster when I remember to use them,
       | but I have literal _decades_ of slow muscle memory that makes me
       | cd /autojump all the time instead.
       | 
       | (Relatedly, why is Dolphin apparently the only GUI file manager
       | trying to make a serious attempt at shell integration? This seems
       | weird? I might be missing something?)
        
         | bityard wrote:
         | My reluctance to use these nice modern shell utilities stems
         | from the fact that if I come to rely on them, I will drive
         | myself crazy trying to use them in places where they are not
         | available and never will be. (I routinely log into various
         | hosts to poke around and troubleshoot.) It's more worth my time
         | to be as efficient as I can with the tools that are included
         | out-of-the-box with most standard Linux and *nix OSes.
         | 
         | (But I can see utilities like this being useful for people who
         | only rarely have a reason to SSH into other hosts, which is
         | most developers I suspect.)
        
           | imiric wrote:
           | I agree to an extent. But then again, I already rely heavily
           | on aliases, functions, vi-mode, command history, and many
           | other shell features, that it's painful to use a barebones
           | shell to get any work done. So I have a small snippet I run
           | on every new environment, to make the experience a little
           | more enjoyable. This includes installing some required tools,
           | copying over bash or zsh configs, the tmux config, etc. It
           | doesn't take more than a minute, and beats struggling with
           | the default environment.
           | 
           | Adding this tool wouldn't be an issue if it greatly increases
           | my productivity.
        
           | em-bee wrote:
           | 100% this. my current activity is spread over half a dozen
           | machines, and i create a new one for every dev project. i
           | want to minimize the amount of setup i have to do to get
           | things working. this is also the reason why i learned VI.
           | because at the time emacs was not available on all the unix
           | systems i was working on, and it wasn't easy to install.
           | 
           | if a tool is very good and it's available as a linux
           | distribution package then i'll use it because i can rely on
           | it being easy to install. but if that's not the case, more
           | often than not it's not worth the effort.
        
       | [deleted]
        
       | desireco42 wrote:
       | This thing is amazing... does everything I want, it is perfect!
       | Love it! Opens in NVim, if I exit, I am back in the file
       | manager... just brilliant. Also exit with Esc to folder you are
       | looking and ctrl-C to original... very cool.
       | 
       | I am really a simple man, what can I say.
        
       | Sakos wrote:
       | This looks cool, though I already use
       | https://github.com/ranger/ranger for this.
        
       | CGamesPlay wrote:
       | I built a "Control-P" feature for fish that would also be a good
       | trigger for this tool. Basically, you activate the shortcut to
       | run the program, then it will change the directory based on the
       | selection, but restore your original command line after. So you
       | can be halfway through a command before realizing you are in the
       | wrong place. Also, can cd with one fewer keystroke. My version is
       | at [0], but obviously modifiable for other tools like this one.
       | 
       | [0]
       | https://github.com/CGamesPlay/dotfiles/blob/3560a5a92d475537...
        
       | deevus wrote:
       | Zsh has this out of the box. You just type the name of a
       | directory and it will `pushd` to it. At least I think it's built-
       | in. It could be oh-my-zsh I suppose.
        
         | bandie91 wrote:
         | in bash it's shopt autocd
        
         | vladvasiliu wrote:
         | It's not out of the box. It works on my omz shell, although I
         | didn't do anything to specifically enable this since it never
         | bothered me to type cd and I kinda hate "magic". On an out-of-
         | the-ubuntu-box zsh, it doesn't work:                   % cd /
         | % bin         zsh: command not found: bin
        
           | pcdavid wrote:
           | This behavior is controled by the AUTO_CD option:
           | https://zsh.sourceforge.io/Doc/Release/Options.html. To
           | enable it yourself:                   setopt AUTO_CD
        
       | mgunyho wrote:
       | Looks very similar to my tool, tere:
       | https://github.com/mgunyho/tere. The main difference seems to be
       | that I don't do any file manipulation, while walk has the option
       | to delete files/folders. In my implementation, you don't need to
       | type '/' for fuzzy search, just typing searches and jumps by
       | default.
       | 
       | I also have a list of similar projects at the end of the README,
       | I'll add this as well! edit: Oh I already had it in my list, the
       | project has just been renamed from llama to walk.
        
       ___________________________________________________________________
       (page generated 2023-08-22 23:01 UTC)