Skip to content

Commit

Permalink
complete (action:file): always suffix "/" to complete symlinked direc…
Browse files Browse the repository at this point in the history
…tory names
  • Loading branch information
akinomyoga committed Feb 2, 2022
1 parent e332dc5 commit 397ac1f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/ChangeLog.md
Expand Up @@ -141,6 +141,7 @@
- canvas: do not insert explicit newlines on line folding if possible (reported by banoris) `#D1745` 02b9da6 dc3827b
- edit (`ble-bind -x`): preserve multiline prompts on execution of `bind -x` commands (requested by SuperSandro2000) `#D1755` 7d05a28
- util (`ble/util/buffer`): hide cursor in rendering `#D1758` 0000000
- complete (`action:file`): always suffix `/` to complete symlinked directory names (reported by SuperSandro2000) `#D1759` 0000000

## Fixes

Expand Down
2 changes: 1 addition & 1 deletion lib/core-complete.sh
Expand Up @@ -1172,7 +1172,7 @@ function ble/complete/action/complete.addtail {
}
function ble/complete/action/complete.mark-directory {
[[ :$comp_type: == *:markdir:* && $CAND != */ ]] &&
[[ :$comp_type: == *:marksymdir:* || ! -h $CAND ]] &&
[[ ! -h $CAND || ( $insert == "$COMPS" || :$comp_type: == *:marksymdir:* ) ]] &&
ble/complete/action/complete.addtail /
}
function ble/complete/action/complete.close-quotation {
Expand Down
12 changes: 12 additions & 0 deletions note.txt
Expand Up @@ -5946,6 +5946,18 @@ bash_tips

2022-02-02

* complete: / が symlink に対して付加されたり付加されなかったりする (reported by SuperSandro2000) [#D1759]
https://github.com/akinomyoga/ble.sh/issues/171#issuecomment-1021326168

bash-completion なしでも再現する → これは分かった。bind -v で
mark-symlinked-directories が off になっているのが原因だった。元の bash だ
とこれが off になっていたとしても2回 TAB を押したら結局 / を挿入する様だ。
→もう少し調べてみると ins が空の時には mark-symlinked-directories がなくて
も / を挿入するという事らしい。

うーん。元の bash と同じ振る舞いになる様に調整する事にした。これの判定は手
持ちの情報で既にできたのでその様にした。

* term: wt で 描画中のカーソル移動が気になる [#D1758]

flush する時か、或いは描画シーケンス自体にカーソル消去・表示のコードを埋め
Expand Down

0 comments on commit 397ac1f

Please sign in to comment.