fcadd (300B)
1 #!/usr/bin/env sh 2 # add files or directories to fcd menu 3 4 INDEXFILE=~/.config/fcd/index.txt 5 6 if [ $# -eq 0 ]; then 7 echo "No arguments provided" 8 exit 1 9 fi 10 11 for arg in "$@" 12 do 13 realpath "$arg" | sed -E 's/^\/home\/[^\/]+/~/' >> "$INDEXFILE" 14 done 15 16 LANG=C sort "$INDEXFILE" -u -o "$INDEXFILE"