Portability: replace GNU extension \s with [[:space:]]
				
					
				
			This commit is contained in:
		
							parent
							
								
									2a37479d60
								
							
						
					
					
						commit
						2e44fe9e90
					
				| @ -6,9 +6,9 @@ set -euo pipefail | ||||
| declare commands_help | ||||
| commands_help=$(hledger) | ||||
| { | ||||
|     sed -rn 's/^\s+([a-z][-a-z]+)\s+.*/\1/p' <<< "$commands_help" | ||||
|     sed -rn 's/^\s+[a-z][-a-z]+\s+\(([a-z][ ,a-z]+)\).*/\1/p' <<< "$commands_help" | | ||||
|     sed 's/\s*,\s*/\n/g' | | ||||
|     sed -rn 's/^[[:space:]]+([a-z][-a-z]+)[[:space:]]+.*/\1/p' <<< "$commands_help" | ||||
|     sed -rn 's/^[[:space:]]+[a-z][-a-z]+[[:space:]]+\(([a-z][ ,a-z]+)\).*/\1/p' <<< "$commands_help" | | ||||
|     sed 's/[[:space:]]*,[[:space:]]*/\n/g' | | ||||
|     sed '/^.$/d' | ||||
| } | sed '/^hledger/d' | sort -u | ||||
| 
 | ||||
|  | ||||
| @ -9,8 +9,8 @@ declare hledgerArgs=(--help) | ||||
| [[ -n $subcommand ]] && hledgerArgs=("$subcommand" "${hledgerArgs[@]}") | ||||
| 
 | ||||
| hledger "${hledgerArgs[@]}" | | ||||
|     sed -rn '/^\s+-/p' | | ||||
|     sed -rn 's/^\s{1,4}(-.)?\s{1,4}(--[a-zA-Z][-_a-zA-Z0-9]+=?).*/\2/p' | | ||||
|     sed -rn '/^[[:space:]]+-/p' | | ||||
|     sed -rn 's/^[[:space:]]{1,4}(-.)?[[:space:]]{1,4}(--[a-zA-Z][-_a-zA-Z0-9]+=?).*/\2/p' | | ||||
|     sort -u | ||||
| 
 | ||||
| # Local Variables: | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user