diff --git a/emacs/michelson-mode.el b/emacs/michelson-mode.el index d72bf5dde..6d9c18258 100644 --- a/emacs/michelson-mode.el +++ b/emacs/michelson-mode.el @@ -387,8 +387,8 @@ Overrides `michelson-print-errors' and `michelson-highlight-errors'" (lexical-let ((tmp-file (make-temp-file buffer-name))) (write-region (point-min) (point-max) tmp-file nil 'no-message) (let ((command - (append (split-string (expand-file-name michelson-client-command) " ") - (list + (append (split-string michelson-client-command " ") + (list "typecheck" "program" (if michelson-alphanet diff --git a/src/bin_client/bash-completion.sh b/src/bin_client/bash-completion.sh index ae99a14d6..c772475d2 100755 --- a/src/bin_client/bash-completion.sh +++ b/src/bin_client/bash-completion.sh @@ -7,12 +7,6 @@ _tezos-client_complete() # Tezos script script=${COMP_WORDS[0]} - if [ -z "$(type -P $script)" ]; then - local tmp="$(alias $script)" - tmp="${tmp#*=}" - tmp="${tmp%\'}" - script="${tmp#\'}" - fi reply=$($script bash_autocomplete "$prev_word" "$cur_word" ${COMP_WORDS[@]}) @@ -53,4 +47,5 @@ _tezos-alphanet_complete() # Register _pss_complete to provide completion for the following commands complete -F _tezos-client_complete tezos-client +complete -F _tezos-client_complete tezos-admin-client complete -F _tezos-alphanet_complete alphanet.sh diff --git a/src/bin_client/tezos-init-sandboxed-client.sh b/src/bin_client/tezos-init-sandboxed-client.sh index 155f98f08..01391cf55 100755 --- a/src/bin_client/tezos-init-sandboxed-client.sh +++ b/src/bin_client/tezos-init-sandboxed-client.sh @@ -13,7 +13,7 @@ init_sandboxed_client() { shift 1 rpc=$((18730 + id)) - client_dir="$(mktemp -d -t tezos-client.XXXXXXXX)" + client_dir="$(mktemp -d -t tezos-tmp-client.XXXXXXXX)" client_dirs+=("$client_dir") client="$local_client -base-dir $client_dir -addr 127.0.0.1 -port $rpc" @@ -228,12 +228,20 @@ main () { add_sandboxed_bootstrap_identities | sed -e 's/^/## /' 1>&2 + mkdir -p $client_dir/bin + echo '#!/bin/sh' > $client_dir/bin/tezos-client + echo "exec $client \"\$@\"" >> $client_dir/bin/tezos-client + chmod +x $client_dir/bin/tezos-client + echo '#!/bin/sh' > $client_dir/bin/tezos-admin-client + echo "exec $client \"\$@\"" | sed s/tezos-client/tezos-adming-client/g >> $client_dir/bin/tezos-admin-client + chmod +x $client_dir/bin/tezos-admin-client + cat </dev/null 2>&1 ; then tezos-client-reset; fi ; -alias tezos-client="$client" ; +PATH="$client_dir/bin:\$PATH" ; export PATH ; alias tezos-activate-alpha="$client -block genesis activate protocol ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK with fitness 1 and key dictator" ; -alias tezos-client-reset="rm -rf \"$client_dir\"; unalias tezos-client tezos-activate-alpha tezos-client-reset" ; -alias tezos-autocomplete="source \"$bin_dir/bash-completion.sh\"" ; +alias tezos-client-reset="rm -rf \"$client_dir\"; unalias tezos-activate-alpha tezos-client-reset" ; +alias tezos-autocomplete="if [ \$ZSH_NAME ] ; then autoload bashcompinit ; bashcompinit ; fi ; source \"$bin_dir/bash-completion.sh\"" ; trap tezos-client-reset EXIT ; EOF diff --git a/src/lib_stdlib_lwt/cli_entries.ml b/src/lib_stdlib_lwt/cli_entries.ml index 5fd7b9ecc..0eb28a713 100644 --- a/src/lib_stdlib_lwt/cli_entries.ml +++ b/src/lib_stdlib_lwt/cli_entries.ml @@ -1197,11 +1197,11 @@ let handle_cli_errors ~stdout ~stderr ~global_options = function Format.fprintf stdout "@." ; return 0 | Autocomplete_command (completions) -> - Format.pp_print_list - ~pp_sep:Format.pp_print_newline - Format.pp_print_string - Format.std_formatter - completions; + Format.fprintf stdout "%a@." + (Format.pp_print_list + ~pp_sep:Format.pp_print_newline + Format.pp_print_string) + completions ; return 0 | Help_flag commands -> let format = if Unix.isatty Unix.stdout then `Ansi else `Plain in