diff --git a/CHANGELOG.md b/CHANGELOG.md index 225e2eb..279ded7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,9 @@ All notable changes to this project will be documented in this file. ## [2025.1 (pending)] ### Added -- add implied . and .. folders to -a option +- implied . and .. folders to -a option - almost all option (-A) +- full path option (-F) ## [2024.6] ### Added diff --git a/lsv/entry.v b/lsv/entry.v index 9a45ab7..bd85aae 100644 --- a/lsv/entry.v +++ b/lsv/entry.v @@ -79,9 +79,10 @@ fn make_entry(file string, dir_name string, options Options) Entry { is_exe := !is_dir && is_executable(stat) is_file := filetype == .regular indicator := if is_dir && options.dir_indicator { '/' } else { '' } + name := if options.full_path { os.real_path(path) + indicator } else { file + indicator } return Entry{ - name: file + indicator + name: name dir_name: dir_name stat: stat link_stat: link_stat diff --git a/lsv/options.v b/lsv/options.v index 61030d1..6e6d6a8 100644 --- a/lsv/options.v +++ b/lsv/options.v @@ -11,6 +11,7 @@ struct Options { blocked_output bool colorize bool dir_indicator bool + full_path bool list_by_lines bool long_format bool no_dim bool @@ -88,6 +89,7 @@ fn parse_args(args []string) Options { almost_all := fp.bool('', `A`, false, 'do not list implied . and ..') colorize := fp.bool('', `c`, false, 'color the listing') dir_indicator := fp.bool('', `D`, false, 'append / to directories') + full_path := fp.bool('', `F`, false, 'show full path') icons := fp.bool('', `i`, false, 'show file icon (requires nerd fonts)') long_format := fp.bool('', `l`, false, 'long listing format (see Long Listing Options)') with_commas := fp.bool('', `m`, false, 'list of files separated by commas') @@ -156,6 +158,7 @@ fn parse_args(args []string) Options { dir_indicator: dir_indicator dirs_first: dirs_first files: if files == [] { current_dir } else { files } + full_path: full_path header: header icons: icons inode: inode