mirror of
https://github.com/dylanaraps/shfm.git
synced 2026-11-06 15:50:58 +00:00
hidden files
This commit is contained in:
2 files changed
+23
-5
No files matched your search
@@ -44,6 +44,7 @@ q - quit
|
|||||||
- - go to last directory
|
- - go to last directory
|
||||||
~ - go home
|
~ - go home
|
||||||
! - spawn shell
|
! - spawn shell
|
||||||
|
. - toggle hidden files
|
||||||
|
|
||||||
|
|
||||||
opener
|
opener
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ list_print() {
|
|||||||
|
|
||||||
redraw() {
|
redraw() {
|
||||||
list_print "$@"
|
list_print "$@"
|
||||||
status_line "$PWD ($y/$#)"
|
status_line "($y/$#) $PWD"
|
||||||
}
|
}
|
||||||
|
|
||||||
status_line() {
|
status_line() {
|
||||||
@@ -87,7 +87,7 @@ prompt() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
printf '\0338\033[?25l'
|
printf '\0338\033[?25l'
|
||||||
status_line "$PWD ($y/$#)"
|
status_line "($y/$#) $PWD"
|
||||||
}
|
}
|
||||||
|
|
||||||
print_line() {
|
print_line() {
|
||||||
@@ -147,7 +147,7 @@ main() {
|
|||||||
|
|
||||||
print_line "$y" "$@"
|
print_line "$y" "$@"
|
||||||
|
|
||||||
status_line "$PWD ($y/$#)"
|
status_line "($y/$#) $PWD"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@@ -162,7 +162,7 @@ main() {
|
|||||||
printf '\n'
|
printf '\n'
|
||||||
print_line "$y" "$@"
|
print_line "$y" "$@"
|
||||||
|
|
||||||
status_line "$PWD ($y/$#)"
|
status_line "($y/$#) $PWD"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@@ -204,6 +204,23 @@ main() {
|
|||||||
redraw "$@"
|
redraw "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
.?)
|
||||||
|
case ${hidden:=1} in
|
||||||
|
1)
|
||||||
|
hidden=0
|
||||||
|
set -- .[!.]*
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
hidden=1
|
||||||
|
set -- *
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
y=1 y2=1 cur=$1
|
||||||
|
redraw "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
:?)
|
:?)
|
||||||
prompt "cd: " r
|
prompt "cd: " r
|
||||||
|
|
||||||
@@ -220,7 +237,7 @@ main() {
|
|||||||
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 "($y/$#) search $ans"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-?)
|
-?)
|
||||||
|
|||||||
Reference in new issue
Block a user