stow/bin
Charles LeDoux feb885fda6 Factor out parsing of options
Why:

* Want to be able to selectively apply filepath expansion to:
    1. Only options in a stowrc file.
    2. Only options that take a file path.

* Because of need 1, any expansion must be performed on stowrc options
  before merging with cli options.

* Because of need 2, stowrc options need to be parsed before expansion
  in order to know which options need expanding.

This change addresses the need by:

* Create parse_options()
    * Implements option parsing logic previously in process_options()
    * Takes an array as parameter instead of assuming ARGV
* Edit process_options() to still work as expected.
    * Only change was to call parse_options() instead of directly
      parsing ARGV

* By factoring out the option parsing code, we can reuse the existing
  parsing code for stowrc options.
    * Allows expansion of only the option itself, i.e expansion on
      "$HOME/target" rather than "--target=$HOME/target"
    * Allows easy determination of which options need expansion.
2019-06-25 19:38:25 +01:00
..
chkstow.in remove duplicate "the" typo 2019-06-25 13:46:30 +01:00
stow.in Factor out parsing of options 2019-06-25 19:38:25 +01:00