diff options
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r-- | Completion/Unix/Command/_ncftp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_ncftp b/Completion/Unix/Command/_ncftp index 93de404aa..763a61344 100644 --- a/Completion/Unix/Command/_ncftp +++ b/Completion/Unix/Command/_ncftp @@ -1,6 +1,12 @@ #compdef ncftp lftp -local expl bookmarks=$HOME/.$service/bookmarks +local expl bookmarks XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} + +if [[ $service = lftp ]]; then + bookmarks=$XDG_DATA_HOME/$service/bookmarks +else + bookmarks=$HOME/.$service/bookmarks +fi if [[ -f $bookmarks ]]; then bookmarks=(${"${(f)$(<$bookmarks)}"%%[[:space:],]*}) |