# s to run scripts.

# so for example if I have a file ~/scripts/run-stuff.sh I can type s run-stuff.sh
# and it will run the script.
# it will also do tab-completion of the script name.
# the only thing it doesnt do is handle sub-directories in the scripts directory.

# completion for s (scripts)
_s_comp() {
  if [ ${OS} = "mac" ]; then
    local LS=gls;
  else
    local LS=ls;
  fi
  reply=("$(${LS} --ignore-backups $HOME/.config/scripts/)");
}

compctl -K _s_comp s


# its possible that you may also need an alias like alias s="${HOME}/scripts"
# edit: note that this will work regardless of what directory you are currently in.
