mirror of
https://github.com/eza-community/eza
synced 2024-09-30 05:06:30 +00:00
feat(completions): Add shell completions for --absolute flag
This commit is contained in:
parent
084ed33a35
commit
05ae8e91a2
|
@ -47,6 +47,11 @@ _eza() {
|
|||
mapfile -t COMPREPLY < <(compgen -W 'fixed gradient --' -- "$cur")
|
||||
return
|
||||
;;
|
||||
|
||||
--absolute)
|
||||
mapfile -t COMPREPLY < <(compgen -W 'on follow off --' -- "$cur")
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$cur" in
|
||||
|
|
|
@ -38,6 +38,11 @@ complete -c eza -l icons -d "When to display icons" -x -a "
|
|||
"
|
||||
complete -c eza -l no-quotes -d "Don't quote file names with spaces"
|
||||
complete -c eza -l hyperlink -d "Display entries as hyperlinks"
|
||||
complete -c eza -l absolute -d "Display entries with their absolute path" -x -a "
|
||||
on\t'Show absolute path for listed entries'
|
||||
follow\t'Show absolute path with followed symlinks'
|
||||
off\t'Do not show the absolute path'
|
||||
"
|
||||
complete -c eza -l smart-group -d "Only show group if it has a different name from owner"
|
||||
|
||||
# Filtering and sorting options
|
||||
|
|
|
@ -18,6 +18,7 @@ export extern "eza" [
|
|||
--icons # When to display icons
|
||||
--no-quotes # Don't quote file names with spaces
|
||||
--hyperlink # Display entries as hyperlinks
|
||||
--absolute # Display entries with their absolute path
|
||||
--group-directories-first # Sort directories before other files
|
||||
--git-ignore # Ignore files mentioned in '.gitignore'
|
||||
--all(-a) # Show hidden and 'dot' files. Use this twice to also show the '.' and '..' directories
|
||||
|
|
|
@ -26,6 +26,7 @@ __eza() {
|
|||
--icons="[When to display icons]:(when):(always auto automatic never)" \
|
||||
--no-quotes"[Don't quote filenames with spaces]" \
|
||||
--hyperlink"[Display entries as hyperlinks]" \
|
||||
--absolute"[Display entries with their absolute path]:(mode):(on follow off)" \
|
||||
--group-directories-first"[Sort directories before other files]" \
|
||||
--git-ignore"[Ignore files mentioned in '.gitignore']" \
|
||||
{-a,--all}"[Show hidden and 'dot' files. Use this twice to also show the '.' and '..' directories]" \
|
||||
|
|
Loading…
Reference in a new issue