sd -- a drop-in replacement for `cd'

Check-in [eea7cae549]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:adjust zsh settings (sdclean now uses arrays etc.).
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1: eea7cae54916f35adb8cc2796515b24eb2447685
User & Date: vdh 2020-02-19 19:09:09
Context
2020-02-19 19:09
adjust zsh settings (sdclean now uses arrays etc.). Leaf check-in: eea7cae549 user: vdh tags: trunk
2019-12-28 10:58
ensure sane input to `sdman'. remove (apparently redundant) use of `eval'. check-in: 5b18ec4ca0 user: vdh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to sd.ksh.

56
57
58
59
60
61
62

63
64
65
66
67
68
69

70
71
72
73
74
75
76
   typeset shellversion ok=0
   if [[ $KSH_VERSION == Version\ A* ]]; then
      ok=1
   elif [[ $KSH_VERSION == @\(\#\)MIRBSD\ KSH* ]]; then
      ok=1
   elif [[ -n $KSH_VERSION ]]; then
      shellversion=$KSH_VERSION   # probably some incompatible pdksh descendant

   elif [[ -n $BASH ]]; then
      ok=1
      # this seems the minimum setting for making `sd' work with bash
      shopt -s extglob
   elif [[ -n $ZSH_NAME ]]; then
      ok=1
      # this seems the minimum setting for making `sd' work with zsh

      set -o KSH_GLOB
      set -o POSIX_BUILTINS
   else
      # unable to identify this one at all.
      shellversion="this shell"
   fi
   if ((!ok)); then







>







>







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
   typeset shellversion ok=0
   if [[ $KSH_VERSION == Version\ A* ]]; then
      ok=1
   elif [[ $KSH_VERSION == @\(\#\)MIRBSD\ KSH* ]]; then
      ok=1
   elif [[ -n $KSH_VERSION ]]; then
      shellversion=$KSH_VERSION   # probably some incompatible pdksh descendant
      #ok=1
   elif [[ -n $BASH ]]; then
      ok=1
      # this seems the minimum setting for making `sd' work with bash
      shopt -s extglob
   elif [[ -n $ZSH_NAME ]]; then
      ok=1
      # this seems the minimum setting for making `sd' work with zsh
      set -o KSH_ARRAYS
      set -o KSH_GLOB
      set -o POSIX_BUILTINS
   else
      # unable to identify this one at all.
      shellversion="this shell"
   fi
   if ((!ok)); then