Nikita 6422bd7492 Fix symlink handling (#581)
* Fix replace dialog for symlinks

If the oldPath is a symlink to the newPath or vice versa, than os.Stat()
would resolve this symlink, and both the oldStat and newStat would be
the same. Hence, the replace dialog would not appear and the newPath
file would be overwritten by the oldPath file whilst the oldPath would
be deleted.

It is the same story when the oldPath and newPath are both symlinks to
the same file.

* Fix completion in the case of broken symlinks

If the current directory contains broken symlinks then matchFile() would
return at first broken symlink.

Let's consider the following example:

$ ls -F ~/
broken@ dir/ file

The broken@ is a symlink to ~/foo - non existent file.

If one would enter the following command in lf:

:cd ~/<tab>

it would not suggest possible completion options because matchFile()
would return as soon as it meet the broken symlink.

* Don't resolve symlinks when move files/dirs (#571)

This will allow to move broken symlinks.

* Fix symlinks copying/moving (#571)

Copy symlinks, do not try to resolve it and copy the file pointed by
this symlink. Also this allows to copy symlink to directory.
2021-02-12 20:50:48 +03:00
2020-12-24 15:49:01 +03:00
2020-10-10 16:53:52 +03:00
2018-06-26 00:46:50 +03:00
2020-08-20 02:19:34 +03:00
2021-01-07 01:10:54 +03:00
2018-05-16 00:05:06 +03:00
2021-02-12 20:50:48 +03:00
2021-02-12 20:50:48 +03:00
2019-01-18 21:21:31 +03:00
2021-02-06 00:19:09 +03:00
2020-07-04 04:07:01 +03:00
2021-02-12 20:50:48 +03:00
2021-02-06 00:19:09 +03:00
2019-08-30 17:32:23 +03:00
2016-08-13 15:49:04 +03:00
2021-01-07 01:10:54 +03:00
2021-02-12 20:50:48 +03:00
2021-01-19 01:53:13 +03:00
2021-01-30 18:29:32 +03:00

LF

Google Groups | Wiki | #lf (on Freenode) | #lf:matrix.org (with IRC bridge)

Build Status Go Report Card GoDoc

This is a work in progress. Use at your own risk.

lf (as in "list files") is a terminal file manager written in Go. It is heavily inspired by ranger with some missing and extra features. Some of the missing features are deliberately omitted since they are better handled by external tools. See faq for more information and tutorial for a gentle introduction with screencasts.

multicol-screenshot singlecol-screenshot

Features

  • Cross-platform (Linux, OSX, BSDs, Windows (partial))
  • Single binary without any runtime dependencies (except for terminfo database)
  • Fast startup and low memory footprint (due to native code and static binaries)
  • Server/client architecture to share file selection between multiple instances
  • Configuration with shell commands
  • Customizable keybindings (vi and readline defaults)
  • Preview filtering (for source highlight, archives, pdfs/images as text etc.)

Non-Features

  • Tabs or windows (handled by window manager or terminal multiplexer)
  • Builtin pager/editor (handled by your pager/editor of choice)

Installation

See packages for community maintained packages.

See releases for pre-built binaries.

If you like to build from the source on unix:

env CGO_ENABLED=0 GO111MODULE=on go get -u -ldflags="-s -w" github.com/gokcehan/lf

On windows cmd:

set CGO_ENABLED=0
set GO111MODULE=on
go get -u -ldflags="-s -w" github.com/gokcehan/lf

On windows powershell:

$env:CGO_ENABLED = '0'
$env:GO111MODULE = 'on'
go get -u -ldflags="-s -w" github.com/gokcehan/lf

Usage

After the installation lf command should start the application in the current directory.

Run lf -help to see command line options.

Run lf -doc to see the documentation.

See etc directory to integrate lf to your shell or editor. An example configuration file can also be found in this directory.

See integrations to integrate lf to other tools.

See tips for more examples.

Contributing

See contributing for guidelines.

S
Languages
Go 74.9%
Roff 21.4%
Shell 2%
PowerShell 0.7%
Nushell 0.5%
Other 0.5%