Original patch written by Richard Hyde and taken from
https://github.com/RichardHyde/noice
{ '$', SEL_END },
/* Change dir */
{ 'c', SEL_CD },
+ { '~', SEL_CDHOME },
/* Toggle hide .dot files */
{ '.', SEL_TOGGLEDOT },
/* Toggle sort by time */
-.Dd November 26, 2015
+.Dd February 25, 2016
.Dt NOICE 1
.Os
.Sh NAME
Change filter (see below for more information).
.It Ic c
Change into the given directory.
+.It Ic ~
+Change to the HOME directory.
.It Ic \&.
Toggle hide .dot files.
.It Ic t
SEL_HOME,
SEL_END,
SEL_CD,
+ SEL_CDHOME,
SEL_TOGGLEDOT,
SEL_MTIME,
SEL_REDRAW,
strlcpy(fltr, ifilter, sizeof(fltr))
DPRINTF_S(path);
goto begin;
+ case SEL_CDHOME:
+ tmp = getenv("HOME");
+ if (tmp == NULL) {
+ clearprompt();
+ goto nochange;
+ }
+ if (canopendir(tmp) == 0) {
+ printwarn();
+ goto nochange;
+ }
+ strlcpy(path, tmp, sizeof(path));
+ /* Reset filter */
+ strlcpy(fltr, ifilter, sizeof(fltr));
+ DPRINTF_S(path);
+ goto begin;
case SEL_TOGGLEDOT:
if (strcmp(fltr, ifilter) != 0)
strlcpy(fltr, ifilter, sizeof(fltr));