Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
7f494944
Unverified
Commit
7f494944
authored
Oct 29, 2021
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(dirhistory): fix ALT+Up/Down key bindings for Terminal.app
parent
49458b87
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
44 deletions
+32
-44
dirhistory.plugin.zsh
plugins/dirhistory/dirhistory.plugin.zsh
+32
-44
No files found.
plugins/dirhistory/dirhistory.plugin.zsh
View file @
7f494944
...
@@ -121,35 +121,24 @@ function dirhistory_zle_dirhistory_future() {
...
@@ -121,35 +121,24 @@ function dirhistory_zle_dirhistory_future() {
}
}
zle
-N
dirhistory_zle_dirhistory_back
zle
-N
dirhistory_zle_dirhistory_back
# xterm in normal mode
bindkey
"
\e
[3D"
dirhistory_zle_dirhistory_back
# xterm in normal mode
bindkey
"
\e
[3D"
dirhistory_zle_dirhistory_back
bindkey
"
\e
[1;3D"
dirhistory_zle_dirhistory_back
# xterm in normal mode
bindkey
"
\e
[1;3D"
dirhistory_zle_dirhistory_back
bindkey
"
\e\e
[D"
dirhistory_zle_dirhistory_back
# Putty
# Terminal.app
bindkey
"
\e
O3D"
dirhistory_zle_dirhistory_back
# GNU screen
if
[[
"
$TERM_PROGRAM
"
==
"Apple_Terminal"
]]
;
then
case
"
$TERM_PROGRAM
"
in
bindkey
"^[b"
dirhistory_zle_dirhistory_back
iTerm.app
)
bindkey
"^[^[[D"
dirhistory_zle_dirhistory_back
;;
# iTerm2
fi
Apple_Terminal
)
bindkey
"^[b"
dirhistory_zle_dirhistory_back
;;
# Terminal.app
# iTerm2
esac
if
[[
"
$TERM_PROGRAM
"
==
"iTerm.app"
]]
;
then
bindkey
"^[^[[D"
dirhistory_zle_dirhistory_back
fi
# Putty:
bindkey
"
\e\e
[D"
dirhistory_zle_dirhistory_back
# GNU screen:
bindkey
"
\e
O3D"
dirhistory_zle_dirhistory_back
zle
-N
dirhistory_zle_dirhistory_future
zle
-N
dirhistory_zle_dirhistory_future
bindkey
"
\e
[3C"
dirhistory_zle_dirhistory_future
bindkey
"
\e
[3C"
dirhistory_zle_dirhistory_future
# xterm in normal mode
bindkey
"
\e
[1;3C"
dirhistory_zle_dirhistory_future
bindkey
"
\e
[1;3C"
dirhistory_zle_dirhistory_future
# xterm in normal mode
# Terminal.app
bindkey
"
\e\e
[C"
dirhistory_zle_dirhistory_future
# Putty
if
[[
"
$TERM_PROGRAM
"
==
"Apple_Terminal"
]]
;
then
bindkey
"
\e
O3C"
dirhistory_zle_dirhistory_future
# GNU screen
bindkey
"^[f"
dirhistory_zle_dirhistory_future
case
"
$TERM_PROGRAM
"
in
fi
iTerm.app
)
bindkey
"^[^[[C"
dirhistory_zle_dirhistory_future
;;
# iTerm2
# iTerm2
Apple_Terminal
)
bindkey
"^[f"
dirhistory_zle_dirhistory_future
;;
# Terminal.app
if
[[
"
$TERM_PROGRAM
"
==
"iTerm.app"
]]
;
then
esac
bindkey
"^[^[[C"
dirhistory_zle_dirhistory_future
fi
bindkey
"
\e\e
[C"
dirhistory_zle_dirhistory_future
bindkey
"
\e
O3C"
dirhistory_zle_dirhistory_future
#
#
...
@@ -181,22 +170,21 @@ function dirhistory_zle_dirhistory_down() {
...
@@ -181,22 +170,21 @@ function dirhistory_zle_dirhistory_down() {
}
}
zle
-N
dirhistory_zle_dirhistory_up
zle
-N
dirhistory_zle_dirhistory_up
# xterm in normal mode
bindkey
"
\e
[3A"
dirhistory_zle_dirhistory_up
# xterm in normal mode
bindkey
"
\e
[3A"
dirhistory_zle_dirhistory_up
bindkey
"
\e
[1;3A"
dirhistory_zle_dirhistory_up
# xterm in normal mode
bindkey
"
\e
[1;3A"
dirhistory_zle_dirhistory_up
bindkey
"
\e\e
[A"
dirhistory_zle_dirhistory_up
# Putty
if
[[
"
$TERM_PROGRAM
"
==
"Apple_Terminal"
||
"
$TERM_PROGRAM
"
==
"iTerm.app"
]]
;
then
bindkey
"
\e
O3A"
dirhistory_zle_dirhistory_up
# GNU screen
bindkey
"^[[A"
dirhistory_zle_dirhistory_up
case
"
$TERM_PROGRAM
"
in
fi
iTerm.app
)
bindkey
"^[^[[A"
dirhistory_zle_dirhistory_up
;;
# iTerm2
# Putty:
Apple_Terminal
)
bindkey
"^[OA"
dirhistory_zle_dirhistory_up
;;
# Terminal.app
bindkey
"
\e\e
[A"
dirhistory_zle_dirhistory_up
esac
# GNU screen:
bindkey
"
\e
O3A"
dirhistory_zle_dirhistory_up
zle
-N
dirhistory_zle_dirhistory_down
zle
-N
dirhistory_zle_dirhistory_down
bindkey
"
\e
[3B"
dirhistory_zle_dirhistory_down
bindkey
"
\e
[3B"
dirhistory_zle_dirhistory_down
# xterm in normal mode
bindkey
"
\e
[1;3B"
dirhistory_zle_dirhistory_down
bindkey
"
\e
[1;3B"
dirhistory_zle_dirhistory_down
# xterm in normal mode
if
[[
"
$TERM_PROGRAM
"
==
"Apple_Terminal"
||
"
$TERM_PROGRAM
"
==
"iTerm.app"
]]
;
then
bindkey
"
\e\e
[B"
dirhistory_zle_dirhistory_down
# Putty
bindkey
"^[[B"
dirhistory_zle_dirhistory_down
bindkey
"
\e
O3B"
dirhistory_zle_dirhistory_down
# GNU screen
fi
case
"
$TERM_PROGRAM
"
in
bindkey
"
\e\e
[B"
dirhistory_zle_dirhistory_down
iTerm.app
)
bindkey
"^[^[[B"
dirhistory_zle_dirhistory_down
;;
# iTerm2
bindkey
"
\e
O3B"
dirhistory_zle_dirhistory_down
Apple_Terminal
)
bindkey
"^[OB"
dirhistory_zle_dirhistory_down
;;
# Terminal.app
esac
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment