diff options
author | 2005-11-24 04:57:43 +1000 | |
---|---|---|
committer | 2005-11-24 04:57:43 +1000 | |
commit | 7d334914f7b0d4689cdc3ab6083696d5962a93ba (patch) | |
tree | 1ff9d0c52377e911b6e4920a2235d5d9e3790832 /init | |
parent | 27a60f465d4dc469c513a270346b3a66151bc34e (diff) |
Minor code tweaks
darcs-hash:20051123185743-ac50b-dc35b7f64e5416f3f2749edebd5235abb5bdff98.gz
Diffstat (limited to 'init')
-rw-r--r-- | init/fish_function.fish | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/init/fish_function.fish b/init/fish_function.fish index 2083757a..1359e170 100644 --- a/init/fish_function.fish +++ b/init/fish_function.fish @@ -6,10 +6,8 @@ function _contains_help -d "Helper function for contains" set bullet \* - if count $LANG >/dev/null - if test (expr match $LANG ".*UTF") -gt 0 - set bullet \u2022 - end + if expr match "$LANG" ".*UTF" >/dev/null + set bullet \u2022 end echo \tcontains - Test if a word is present in a list\n @@ -223,10 +221,8 @@ function prompt_pwd -d "Print the current working directory, ellipsise it if it #Write ellipsis character if known to be using UTF #else use $ set -l ellipsis '$' #default - if count $LANG >/dev/null - if test (expr match $LANG ".*UTF") -gt 0 - set ellipsis \u2026 - end + if expr match "$LANG" ".*UTF" >/dev/null + set ellipsis \u2026 end printf %s%s $ellipsis (echo $wd|cut -c (echo $len-$max_width-1|bc)- ^/dev/null ) else @@ -564,10 +560,8 @@ end function __fish_type_help -d "Help for the type shellscript function" set bullet \* -if count $LANG >/dev/null - if test (expr match $LANG ".*UTF") -gt 0 - set bullet \u2022 - end +if expr match "$LANG" ".*UTF" >/dev/null + set bullet \u2022 end echo \ttype - Indicate how a name would be interpreted if used as a \n\tcommand name |