Skip to content

Commit

Permalink
fix(plugins/plugin-bash-like): internal: ls should always use `nameFo…
Browse files Browse the repository at this point in the history
…rDisplay`

Fixes #6971
  • Loading branch information
starpit committed Feb 5, 2021
1 parent a5eae35 commit c3b18ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/plugin-bash-like/fs/src/lib/ls.ts
Expand Up @@ -117,8 +117,8 @@ function cssOf(glob: GlobStats): string {
* Decorate the name according to its nature
*
*/
function nameOf(glob: GlobStats, wide: boolean): string {
return `${wide ? glob.nameForDisplay : glob.name}${
function nameOf(glob: GlobStats): string {
return `${glob.nameForDisplay}${
glob.dirent.isDirectory
? !glob.nameForDisplay.endsWith('/')
? '/'
Expand Down Expand Up @@ -200,7 +200,7 @@ function toTable(entries: GlobStats[], args: Arguments<LsOptions>): Table {
const hasMtime = entries.some(_ => _.stats && _.stats.mtimeMs)

const body = entries.sort(sorter).map(_ => ({
name: nameOf(_, args.parsedOptions.l),
name: nameOf(_),
css: cssOf(_),
onclickExec: 'pexec' as const,
onclick: `${_.dirent.isDirectory ? (args.parsedOptions.l ? 'ls -l' : 'ls') : 'open'} ${encodeComponent(_.path)}`,
Expand Down

0 comments on commit c3b18ce

Please sign in to comment.