dotfiles

Older, unmaintained dotfiles by mrgrouse
Log | Files | Refs | README

_tide_init.fish (1599B)


      1 function _tide_init_install --on-event _tide_init_install
      2     set -U VIRTUAL_ENV_DISABLE_PROMPT true
      3 
      4     source (functions --details _tide_sub_configure)
      5     _load_config lean
      6     _tide_finish
      7 
      8     if status is-interactive
      9         tide bug-report --check || sleep 4
     10 
     11         if contains ilancosman/tide (string lower $_fisher_plugins)
     12             set_color bryellow
     13             echo "ilancosman/tide is a development branch. Please install from a release tag:"
     14             _tide_fish_colorize "fisher install ilancosman/tide@v6"
     15             sleep 3
     16         end
     17 
     18         switch (read --prompt-str="Configure tide prompt? [Y/n] " | string lower)
     19             case y ye yes ''
     20                 tide configure
     21             case '*'
     22                 echo -s \n 'Run ' (_tide_fish_colorize "tide configure") ' to customize your prompt.'
     23         end
     24     end
     25 end
     26 
     27 function _tide_init_update --on-event _tide_init_update
     28     # Warn users who install from main branch
     29     if contains ilancosman/tide (string lower $_fisher_plugins)
     30         set_color bryellow
     31         echo "ilancosman/tide is a development branch. Please install from a release tag:"
     32         _tide_fish_colorize "fisher install ilancosman/tide@v6"
     33         sleep 3
     34     end
     35 
     36     # Set (disable) the new jobs variable
     37     set -q tide_jobs_number_threshold || set -U tide_jobs_number_threshold 1000
     38 end
     39 
     40 function _tide_init_uninstall --on-event _tide_init_uninstall
     41     set -e VIRTUAL_ENV_DISABLE_PROMPT
     42     set -e (set -U --names | string match --entire -r '^_?tide')
     43     functions --erase (functions --all | string match --entire -r '^_?tide')
     44 end