Merge pull request #302 from jeffbyrnes/tighten-up-shell-shortcuts

Avoid running ll code if its not used
This commit is contained in:
Wilhelmina Drengwitz
2020-07-29 17:35:33 -07:00
committed by GitHub

View File

@@ -92,6 +92,9 @@ if [ "$shell_command_wrapping_enabled" = "true" ] || [ "$bash_command_wrapping_e
fi fi
# Function wrapper around 'll'
# Adds numbered shortcuts to output of ls -l, just like 'git status'
if [ "$shell_ls_aliases_enabled" = "true" ] && builtin command -v ruby > /dev/null 2>&1; then
# BSD ls is different to Linux (GNU) ls # BSD ls is different to Linux (GNU) ls
# Test for BSD ls # Test for BSD ls
if ! ls --color=auto > /dev/null 2>&1; then if ! ls --color=auto > /dev/null 2>&1; then
@@ -108,9 +111,6 @@ else
_abs_path_command=(perl -e 'use Cwd abs_path; print abs_path(shift)') _abs_path_command=(perl -e 'use Cwd abs_path; print abs_path(shift)')
fi fi
# Function wrapper around 'll'
# Adds numbered shortcuts to output of ls -l, just like 'git status'
if [ "$shell_ls_aliases_enabled" = "true" ] && builtin command -v ruby > /dev/null 2>&1; then
unalias ll > /dev/null 2>&1; unset -f ll > /dev/null 2>&1 unalias ll > /dev/null 2>&1; unset -f ll > /dev/null 2>&1
function ls_with_file_shortcuts { function ls_with_file_shortcuts {
local ll_output local ll_output