diff options
author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2024-02-19 08:50:27 +0900 |
---|---|---|
committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2024-02-19 08:50:27 +0900 |
commit | d2f63d0d92f17d935787e6b0d39d89fe591fa910 (patch) | |
tree | 09f2195bb7480a6bee4842a44f066af2ef594a7b | |
parent | 4a86a54d2b17af3bd389e93810c10d0c39c20e92 (diff) | |
download | zsh-d2f63d0d92f17d935787e6b0d39d89fe591fa910.tar.gz zsh-d2f63d0d92f17d935787e6b0d39d89fe591fa910.tar.xz zsh-d2f63d0d92f17d935787e6b0d39d89fe591fa910.zip |
* 52544: _diff_options: support macOS Ventura or newer
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Unix/Type/_diff_options | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index f0e717370..4ed8e919d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-02-19 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> + + * 52544: Completion/Unix/Type/_diff_options: support macOS Ventura + or newer + 2024-02-18 Bart Schaefer <schaefer@toltec-ubuntu> * 52558: Etc/FAQ.yo: make note of word splitting differences diff --git a/Completion/Unix/Type/_diff_options b/Completion/Unix/Type/_diff_options index 45b777dfe..03ea1d7fe 100644 --- a/Completion/Unix/Type/_diff_options +++ b/Completion/Unix/Type/_diff_options @@ -25,7 +25,8 @@ _diff_palette() { return ret } -if _pick_variant -r variant -c $cmd gnu=GNU unix -v || [[ $OSTYPE = freebsd<12->.* ]]; then +if _pick_variant -r variant -c $cmd gnu=GNU unix -v || + [[ $OSTYPE = (freebsd<12->|darwin<22->).* ]]; then (( $#words > 2 )) && ign='!' # output formats @@ -73,15 +74,18 @@ if _pick_variant -r variant -c $cmd gnu=GNU unix -v || [[ $OSTYPE = freebsd<12-> "($ofwl $ouc $oss)--unchanged-line-format=[set unchanged line format]:unchanged line format" '(--to-file)--from-file=[compare specified file to all operands]:from file:_files' '(--from-file)--to-file=[compare all operands to specified file]:to file:_files' - '--color=-[use colors in output]::when [auto]:(never always auto)' '--palette=[specify colors to use]:color:_diff_palette' "${ign}(1 2)-v[display version information]" ) else args+=( '!--speed-large-files' ) + if [[ $OSTYPE = darwin<22->.* ]]; then + args+=( '(-A --algorithm)'{-A+,--algorithm=}'[specify the algorithm to use]:algorithm:(myers patience stone)' ) + fi fi _arguments -s $args \ + '--color=-[use colors in output]::when [auto]:(never always auto)' \ '(-i --ignore-case)'{-i,--ignore-case}'[case insensitive]' \ '--ignore-file-name-case[ignore case when comparing file names]' \ '!(--ignore-file-name-case)--no-ignore-file-name-case' \ |