local OLDIFS="$IFS";local IFS=$'\n'# Change divider for iterator one line below
opts=$(for x in`ipfs file ls${lastDir}`;do echo${lastDir}${x}/ ;done)# TODO: Implement "ipfs file ls -F" to get rid of frontslash after files. This take long time to run first time on a new shell.
[[$COMPREPLY=*/ ]]&& compopt -o nospace -o filenames # Removing whitespace after output & handle output as filenames. (Only printing the latest folder of files.)
return 0
}
_ipfs_files_complete()
{
local lastDir=${word%/*}/
local OLDIFS="$IFS";local IFS=$'\n'# Change divider for iterator one line below
opts=$(for x in`ipfs files ls${lastDir}`;do echo${lastDir}${x}/ ;done)# TODO: Implement "ipfs files ls -F" to get rid of frontslash after files. This does currently throw "Error: /cats/foo/ is not a directory"