mirror of
https://github.com/dylanaraps/shfm.git
synced 2026-11-20 19:41:43 +00:00
keys
This commit is contained in:
2 files changed
+32
-3
No files matched your search
@@ -41,6 +41,9 @@ G - go to bottom
|
|||||||
q - quit
|
q - quit
|
||||||
: - cd to <input>
|
: - cd to <input>
|
||||||
/ - search current directory *<input>*
|
/ - search current directory *<input>*
|
||||||
|
- - go to last directory
|
||||||
|
~ - go home
|
||||||
|
! - spawn shell
|
||||||
|
|
||||||
|
|
||||||
opener
|
opener
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ main() {
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
esc_char=$(printf '\033')
|
esc_char=$(printf '\033')
|
||||||
|
bs_char=$(printf '\177')
|
||||||
|
|
||||||
cd "${1:-"$PWD"}"
|
cd "${1:-"$PWD"}"
|
||||||
set -- *
|
set -- *
|
||||||
@@ -166,7 +167,7 @@ main() {
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
l?|C2) # ARROW RIGHT
|
l?|C2|"$esc") # ARROW RIGHT
|
||||||
if cd "$cur"; then
|
if cd "$cur"; then
|
||||||
set -- *
|
set -- *
|
||||||
y=1 y2=1
|
y=1 y2=1
|
||||||
@@ -179,7 +180,7 @@ main() {
|
|||||||
redraw "$@"
|
redraw "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
h?|D2) # ARROW LEFT
|
h?|D2|"$bs_char"?) # ARROW LEFT
|
||||||
old_pwd=$PWD
|
old_pwd=$PWD
|
||||||
|
|
||||||
case $search in
|
case $search in
|
||||||
@@ -217,12 +218,37 @@ main() {
|
|||||||
prompt / r
|
prompt / r
|
||||||
|
|
||||||
set -- *"$ans"*
|
set -- *"$ans"*
|
||||||
|
|
||||||
y=1 y2=1 cur=$1 search=1
|
y=1 y2=1 cur=$1 search=1
|
||||||
redraw "$@"
|
redraw "$@"
|
||||||
status_line "search: $ans ($y/$#)"
|
status_line "search: $ans ($y/$#)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
-?)
|
||||||
|
cd "$OLDPWD" >/dev/null 2>&1|| continue
|
||||||
|
|
||||||
|
set -- *
|
||||||
|
y=1 y2=1 cur=$1
|
||||||
|
redraw "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
\~?)
|
||||||
|
cd || continue
|
||||||
|
|
||||||
|
set -- *
|
||||||
|
y=1 y2=1 cur=$1
|
||||||
|
redraw "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
\!?)
|
||||||
|
export SHFM_LEVEL
|
||||||
|
SHFM_LEVEL=$((SHFM_LEVEL + 1))
|
||||||
|
|
||||||
|
term_reset
|
||||||
|
"${SHELL:=/bin/sh}"
|
||||||
|
term_setup
|
||||||
|
redraw "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
q?)
|
q?)
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in new issue
Block a user