Is there anything to watch out for if you wanted to override ls? Is there a more reliable way of getting pagination out of ls?
For example:
function ls() { command ls -hp $@ | more; }
|
Is there anything to watch out for if you wanted to override For example:
|
|||
|
No harm doing it your way as it may be scoped to interactive shells and not impact scripts. Only danger (and it may be a big one if you work on wide range of systems) - you may get used to a habit of using a non-standard mapping unnecessarily. Particularly with E.g. many systems implement To see which shortcuts are readily available to you type |
|||
|
|
|
You don't use ls in a script (don't parse ls), so that function will only be used by you in an interactive shell. Nothing to watch out for. Aside from adding double quotes around |
|||
|
|
"$@". – jordanm Dec 1 '12 at 19:36