Avoid running ll code if its not used
Prior to this, if $shell_ls_aliases_enabled="false", this code would still run, but unnecessarily.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user