Skip to content

Commit

Permalink
detect fish version by looking for disown builtin
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-nisbet authored and rjbou committed Mar 27, 2019
1 parent cc79400 commit 9410650
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/opamConfigCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ let rec print_fish_env env =
(* set manpath if and only if fish version >= 2.6 *)
let manpath_cmd v =
OpamConsole.msg "%s" (
"awk -v f=$FISH_VERSION " ^
"'BEGIN { split(f, fs, \".\"); goodfish = fs[1] > 2 || (fs[1] == 2 && fs[2] >= 6); if (goodfish) { exit 0 } else { exit 1 } }' " ^
"; and "
(* test for existence of disown builtin, introduced in fish 2.7 *)
(* depends on `string' builtin, introduced in fish 2.3 *)
"builtin string match -q disown (builtin -n); and "
) ;
set_arr_cmd "MANPATH" v in
match env with
Expand Down

0 comments on commit 9410650

Please sign in to comment.