Skip to content

Commit

Permalink
Add key mapping 's' to group directories
Browse files Browse the repository at this point in the history
Fixes hut#5. Enabled by default. Does not preserve the selection, though.
  • Loading branch information
SammysHP committed Dec 26, 2016
1 parent 989cb7e commit 4580d8e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lscd
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ lscd_base () {

# Initialize settings
local BOOL_show_hidden=
local BOOL_group_directories=1
local BOOL_clear=
local BOOL_show_info=
local STRING_file_opener=rifle
Expand Down Expand Up @@ -174,6 +175,7 @@ lscd_base () {
args=
fi
test -n "$BOOL_show_hidden" && args="$args -A"
test -n "$BOOL_group_directories" && args="$args --group-directories-first"

if [ -n "$BOOL_show_info" -a "$1" == "-v" ]; then
# Strip off the summary line
Expand Down Expand Up @@ -343,6 +345,11 @@ lscd_base () {
if [ -z "$BOOL_show_hidden" ]; then BOOL_show_hidden=1; else BOOL_show_hidden=; fi
reprint=1
redraw=1;;
s)
# Toggle directory grouping
if [ -z "$BOOL_group_directories" ]; then BOOL_group_directories=1; else BOOL_group_directories=; fi
reprint=1
redraw=1;;
x)
# Toggle showing additional file information
if [ -z "$BOOL_show_info" ]; then BOOL_show_info=1; else BOOL_show_info=; fi
Expand Down

0 comments on commit 4580d8e

Please sign in to comment.