[kwlug-disc] ncurses file selection tool

Chris Frey cdfrey at foursquare.net
Thu Jan 14 15:59:40 EST 2021


Thank you!  I've used the first two steps, but not the execution step.
That was the missing piece.

- Chris


On Thu, Jan 14, 2021 at 12:52:13PM -0500, Doug Moen wrote:
> I use a brutally primitive subset of vim.
> 
> Open a new buffer.
> 
>     :r ls
> 
> reads a list of files from the current directory into the buffer.
> Then, edit the buffer into a shell script. Eg, to remove all the files,
> 
>     :%s,^,rm ,
> 
> Delete any lines that remove files you don't want to remove.
> Then run the shell script:
> 
>     :w !sh
> 
> I don't general use this technique just to remove files, usually the commands are more complicated. That was just an example.
> 
> The benefit of this technique is that it is Turing complete. I can accomplish anything. I don't have to learn a new tool, and I don't run into the limitations that high level tools usually suffer from.
> 
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org




More information about the kwlug-disc mailing list