Skip to content

Commit

Permalink
from: fallback to command for non-existent files.
Browse files Browse the repository at this point in the history
  • Loading branch information
eepykate committed Oct 27, 2021
1 parent 68ff9eb commit dab69da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpm
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ resolve() {
printf '%s\n' "${PWD}/${1##*/}"
}

# from: if file doesn't exist, fallback to a command
[ "$OP" = from ] && [ ! -e "$2" ] && set -- from "$(command -v "$2")"

# figure out which sudo command to use
# this is somewhat based on how xtools does it (for xi, specifically)
SUDO=
Expand Down

0 comments on commit dab69da

Please sign in to comment.