这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@tomty89
Copy link
Contributor

@tomty89 tomty89 commented Apr 8, 2018

For termux/termux-api#158, replacing #12

Significant changes:

  1. Avoid all the unnecessary "flags" with a single record variable.
  2. Use an array for params so that proper quoting can be done
  3. Use getopts builtin error reporting (for both illegal option and missing required argument) but show usage additionally
  4. Avoid redundant code by using a function sole() for options that should be solely used; tolerate -d to be used with -f or -l as in the original script
  5. use dirname + realpath instead of pwd for possible absolute path (e.g. /sdcard/somedir/somefile)

@Grimler91
Copy link
Member

@tomty89 Wouldn't it be better to open a pull request against #12 instead?

In case some solely used options that take an argument will be
added in the future.
fornwall added a commit that referenced this pull request Apr 8, 2018
@fornwall fornwall closed this Apr 8, 2018
@fornwall
Copy link
Member

fornwall commented Apr 8, 2018

Thanks - this is now available in version 0.28 of the termux-api package!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants